def li(b): t=0 for i in range(len(b)): for j in range(i,len(b)): if b[i]>b[j]: b[i],b[j]=b[j],b[i] return b a=[1,2,8,2,4,2,5,1,5,4,8,5,21,4,8,4] print(li(a))
运行结果
欢迎分享,转载请注明来源:内存溢出
def li(b): t=0 for i in range(len(b)): for j in range(i,len(b)): if b[i]>b[j]: b[i],b[j]=b[j],b[i] return b a=[1,2,8,2,4,2,5,1,5,4,8,5,21,4,8,4] print(li(a))
运行结果
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)