1、冒泡排序
li = [33,22,1,7]for j in range(1,len(li)): for i in range(len(li) - j): if li[i] > li[i + 1]: temp = li[i] li[i] = li[i + 1] li[i + 1] = tempprint(li)