代码 endstr=“end” str="" for line in iter(input,endstr): #以end作为输入结束标志 #输入end作为结束 str += line + ‘\n’ print(str)