I wanted to read a variable from terminal by running a script. This is my script.py:
while True:
value = input('enter text: ')
if value == 'stop':
print('bye-bye')
break
else:
print('continue!')
However, when I ran python script.py
, something weird happened.
If i entered int-data (for instance 1,2,3), there was no problem.
If i entered 'stop', I just got an error:
SyntaxError: invalid syntax