📜  多行输入python代码示例

📅  最后修改于: 2022-03-11 14:47:20.808000             🧑  作者: Mango

代码示例4
print("Enter/Paste your content. Ctrl-D or Ctrl-Z ( windows ) to save it.")
contents = []
while True:
    try:
        line = input()
    except EOFError:
        break
    contents.append(line)