阅读背景:

如何在没有定义任何限制的情况下在python中获取任意数量的输入?

来源:互联网 

Now, the thing is that I am supposed to take an unknown amount of input from the user like on one run he can enter 10 terms on another run he can enter 40. And I cannot ask user initially to enter the value of n so that I can run a range loop and start storing the input in list. If somehow I can do this then for that I have created the loop but that is not the case. So, the question is how to define the endpoint for user? or how to pass unknown number of arguments to the function?Now, the thing is that I am supposed to take an




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: