最后以步长1排序(就是简单的插入排序了) 1defshell_sort(ary):2n =len(ary)3gap = round(n/2)#初始步长 , 用round四舍五入取整4whilegap >0 :5foriinrange(gap,n):#每一列进行插入排序 , 从gap 到 n-16temp =ary[i]7j =i8while( j >= gapandary[j-gap] > temp ):#插入排序9ary[j] =...