Store multi-line input into a String (Python)

前端 未结 5 1820
鱼传尺愫
鱼传尺愫 2021-02-06 16:28

Input:

359716482
867345912
413928675
398574126
546281739
172639548
984163257
621857394
735492861

my co

5条回答
  •  余生分开走
    2021-02-06 17:03

    You can use readlines() method of file objects:

    import sys
    userInput = sys.stdin.readlines()
    

提交回复
热议问题