Noob raw_input question
Robert Kern
robert.kern at gmail.com
Wed Feb 24 13:21:08 EST 2010
On 2010-02-24 11:39 AM, Abigail wrote:
> Yesterday I downloaded and installed Python 3.1 and working through some
> examples but I have hit a problem
>
>>>> a = raw_input("Enter a number" )
> Traceback (most recent call last):
> File "<pyshell#6>", line 1, in<module>
> a = raw_input("Enter a number" )
> NameError: name 'raw_input' is not defined>>>a = raw_input("Enter a number
> ")
>
> What am I doing wrong?
Python 3 changed the name of raw_input() to input() (and the old input() method
that evaluates the string was simply thrown out as being redundant and unsafe).
http://docs.python.org/dev/3.0/whatsnew/3.0.html
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list
mailing list