Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想采用由新行分隔的输入,但我不希望它采用固定数量的输入。然后对给定的输入执行一些操作。有关更多信息,请查看此 codechef 问题。
您可以做的是使用while循环并检查每次迭代中的输入值
input_list=[] value=input() while(value!=condition): value=input() input_list.append(value)