python选择排序

来源:互联网 发布:飞鸟淘宝客 编辑:程序博客网 时间:2024/05/17 03:46
def choosesort(list):    for i in range(0,len(list)):        for j in range(len(list)-1,i,-1):            if list[j] < list[i]:                list[j], list[i] = list[i], list[j]    print listchoosesort([54,26,93,17,77,31,44,55,20])

0 0
原创粉丝点击