快排 b=[4,7,9,2,5,1] for i in range(len(b)): for j in range(len(b)-1): if b[i]<b[j]: b[i],b[j]=b[j],b[i]print(b)