使用 input() 从用户获取输入行的内置函数。
input()
你可以阅读 the help here .
您可以使用以下代码一次获取多行(以空行结束):
while input() != '': do_thing