python怎么在一行中输入n个数
导读:python怎么在一行中输入n个数?以下代码调试通过:l = [] for i in range(5 : n = input("please enter the number:" l.append(n print('l:',...
python怎么在一行中输入n个数?
以下代码调试通过:
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
声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!
若转载请注明出处: python怎么在一行中输入n个数
本文地址: https://pptw.com/jishu/57485.html
