Noob raw_input question

Chris Rebert clp2 at rebertia.com
Wed Feb 24 13:16:18 EST 2010


On Wed, Feb 24, 2010 at 9:39 AM, Abigail <spam at removethis.btinternet.com> 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?

raw_input() got renamed to just input().
Please read the 3.x transition docs at
http://docs.python.org/3.1/whatsnew/3.0.html

Cheers,
Chris
--
http://blog.rebertia.com



More information about the Python-list mailing list