Skip to content
Advertisement

How do I use raw_input in Python 3?

In Python 2:

JavaScript

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.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement