1

The program as shown below runs without pausing to take my input. If I uncomment the line with inpt = input() function and comment out the inpt = sys.stdin.read() - it behaves as expected: waits for my input then terminates.

What did I do wrong? In case that matters, IDE is Spider.

import sys

if __name__ == '__main__':
    #inpt = input()
    inpt = sys.stdin.read()
Mutaz-MSFT
  • 756
  • 5
  • 20

0 Answers0