符合选择排序的思想

a= [9,1,33,23,12,8,9]

for i in range(0,len(a)):
    for j in range(0,i):
        if(a[i]>a[j]):
            temp = a[j]
            a[j] = a[i]
            a[i] = temp

print(a)

  

posted @ 2018-03-14 10:48  植入代码  阅读(112)  评论(0编辑  收藏  举报