sort_action

 

 

li, r = [23,8, 45, 5, 0, -6, 745,8, 8], []
while (len(li) > 0):
    loop_, min, tag = len(li), li[0], 0
    for i in range(0, loop_, 1):
        chk = li[i]
        if min > chk:
            min, tag = chk, li.index(chk)
    r.append(min)
    del li[tag]

  

 

posted @ 2017-11-09 10:11  papering  阅读(221)  评论(0编辑  收藏  举报