NameError: name ‘raw_input’ is not defined

Traceback (most recent call last):
File “<pyshell#0>”, line 1, in
NameError: name ‘raw_input’ is not defined

NameError name 'raw_input' is not defined


raw_input() was renamed to input(). That is, the new input() function reads a line from sys.stdin and returns it with the trailing newline stripped.
raw_input() — Feature of python 2.x
input() — Feature of of Python 3.x

>>> first_name=input()
K2schools Administrator

Related Posts

Responses are currently closed, but you can trackback from your own site.

Comments are closed.

Powered by k2schools
%d bloggers like this: