Python default behavior eats all input lines, leaving EOFError for next script

前端 未结 0 378
感动是毒
感动是毒 2021-01-29 10:55

It appears Python is a greedy taker of input lines?

Very simple Python3 script: testinput.py

for i in range(5):
    x = input()
    print(f\'{i}. {x}\')


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题