标签:sort 排序 pop pre html list highlight turn 插入
def insert_sort(ilist): for i in range(len(ilist)): for j in range(i): if ilist[i] < ilist[j]: ilist.insert(j, ilist.pop(i)) break return ilist ilist = insert_sort([4,5,6,7,3,2,6,9,8]) print(ilist)
标签:sort 排序 pop pre html list highlight turn 插入
原文地址:https://www.cnblogs.com/sea-stream/p/9689022.html