heres a dumb question....

Antaeus Feldspar feldspar at ix.netcom.com
Mon Feb 4 14:18:48 EST 2002


"jim.vickroy" wrote:
> 
> How about the raw_input() function?
> 
> > x = raw_input('Enter an integer: ') # Enter 123
> > x
> 123
> 
> The prompt string (e.g., 'Enter an integer: ') is optional.

A slight correction/clarification here.  What you'll get back is not the
integer 123, but the string '123'.  The int() function will perform the
conversion for you if it's the integer you want.

	-jc



More information about the Python-list mailing list