0

When I ask for an Input for example:

userInput = input('Left or Right? ')
if userInput == 'Left':
    print('okay')

And then run the program, type "Left", This Error shows up:

userInput = input('Left or Right? ')
File "<string>", line 1, in <module>
NameError: name 'Left' is not defined

How can I fix this?

Running Python 3.6.0 on Linux

martineau
  • 112,593
  • 23
  • 157
  • 280

0 Answers0