I have written a simple Python3 program like below:
import sys
input = sys.stdin.read()
tokens = input.split()
print (tokens)
a = int(tokens[0])
b = int(tokens[1])
if ((a + b)> 18):
print ("Input numbers should be between 0 and 9")
else:
print(a + b)
but while running this like below:
C:\Python_Class>python APlusB.py
3 5<- pressed enter after this
but output is not coming until I hit ctrl+C (in windows)
C:\Python_Class>python APlusB.py
3 5
['3', '5']
8
Traceback (most recent call last):
File "APlusB.py", line 20, in <module>
print(a + b)
KeyboardInterrupt