当前位置:主页 > 软件编程 > Python代码 >

用python 实现在不确定行数情况下多行输入方法

时间:2021-03-06 10:11:15 | 栏目:Python代码 | 点击:

如下所示:

stopword = ''
str = ''
for line in iter(raw_input, stopword):
 str += line + '\n'
print(str)

您可能感兴趣的文章:

相关文章