标签:+= 排序 color code range class pre span while
lst = [5,2,14,66,30,1,88,7,20]
将无序列表进行排序
lst = [5,2,14,66,30,1,88,7,20] for i in range(len(lst)) : i = 0 while i < len(lst)-1 : if lst[i] > lst[i+1]: lst[i], lst[i+1] = lst[i+1], lst[i] i += 1 print(lst)
标签:+= 排序 color code range class pre span while
原文地址:https://www.cnblogs.com/beihan/p/9355191.html