ls=[3,7,2,1] for i in range(3,0,-1): for j in range(i): if ls[j]>ls[j+1]: ls[j],ls[j+1]=ls[j+1],ls[j] print(ls)
以上程序打印的结果是?( )
[1,3,2,7]
[1,2,3,7]
[3,2,1,7]
[1,7,3,2]