执行完下面代码后,输出的结果为( )
ls = [6, 1, 8, 6, 9, 6] n = len(ls) for i in range(n): for j in range(i+1,n): if ls[j]>ls[i]: tmp = ls[i] ls[i] = ls[j] ls[j] = tmp print(ls)
[6,6,8,6,9,1]
[1,6,6,6,8,9]
[9,8,6,6,6,1]
程序报错无输出
QQ扫一扫联系
点击联系
2281286789
手机刷题也方便
有问题找客服