It worked well at school, but it doesn't work when I get home. It says raw_input is undefined, what's wrong?
import sys
print (sys.platform)
print (2 ** 100)
raw_input()
Traceback (most recent call last): File "/Users/hoj/PycharmProjects/mine.py", line 1, in raw_input()
python nameerror
This is because the Python version used at school/home is different.
I think I use 2.x at school and 3.x at home. raw_input() cannot be written in 3.x; you must write input().
© 2024 OneMinuteCode. All rights reserved.