In Python 2:
raw_input()
In Python 3, I get an error:
NameError: name ‘raw_input’ is not defined
Advertisement
Answer
Starting with Python 3, raw_input()
was renamed to input()
.
From What’s New In Python 3.0, Builtins section second item.
In Python 2:
raw_input()
In Python 3, I get an error:
NameError: name ‘raw_input’ is not defined
Starting with Python 3, raw_input()
was renamed to input()
.
From What’s New In Python 3.0, Builtins section second item.