标签:def 排序 logs highlight ret python 插入 log and
#coding=utf-8
def insertSort(L):
for i in range(1,len(L)):
min=L[i]
j=i-1
while j>=0 and L[j]>min:
L[j+1]=L[j]
j-=1
L[j+1]=min
return L
print insertSort([6,2,3,4,5])
标签:def 排序 logs highlight ret python 插入 log and
原文地址:http://www.cnblogs.com/bigbig/p/7562693.html