以下代码调试通过:
l = []
for i in range(5):
n = input("please enter the number:")
l.append(n)
print('l:', l)
运行效果:
please enter the number:12
please enter the number:34
please enter the number:56
please enter the number:35
please enter the number:22
l: ['12', '34', '56', '35', '22']
Process finished with exit code 0