python冒泡排序
array=[8,4,87,20,33,10,43] count=len(array) for i in range(count): for j in range(i): if array[j]>array[j+1]: array[i],array[j]=array[j],array[i] print array
打印结果: [4, 8, 20, 43, 10, 33, 87]