#!/usr/bin/python# -*- coding: utf-8 -*-def bubble_sort(array): length=len(array)-1 for i in range(0,length): for j in range(i,length): if array[i]>array[j+1]: array[i],array[j+1]=array[j+1],array[i] return arrayif __name__ == '__main__': ar = [8,10,9,6,4,16,5,13,26,18,2,45,34,23,1,7,3] bubble_sort(ar) print(bubble_sort(ar))