Jul-03-2018, 03:44 PM
I guess you use python2 and this code is for python3. As a newbie, you should start with python3.
in python2
in python3 it's ok,
but again - switch to python3
in python2
input()
evaluates the user input. you should use raw_input()
instead - it will always return string.in python3 it's ok,
input()
works as raw_input()
in python2, while eval(input())
works like input()
in python2but again - switch to python3
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs