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