你好,你的代码是可以运行的,在jupyter notebook 上没问题的:
i=[] for k in range(3): x = input("请输入整数:") m = int(x) i.append(m) i.sort() print(i)