请问执行完以下代码后,输出结果为?
ls = [1, 2, 3, 4, 5, 1]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)
[1, 2, 3, 4, 5, 1]
[1, 1, 2, 3, 4, 5]
[5, 4, 3, 2, 1, 1]
报错,无输出