[Tutor] dealing with user input whose value I don't know

David ldl08 at gmx.net
Thu Oct 2 19:38:48 CEST 2008


Hello Christopher,

christopher.henk at allisontransmission.com wrote:

>  >
>  > Okay, I can ask how many number are to be added:
>  >
>  > numbers = input("How many number do you want me to calculate? ")
> 
>         you should really use raw_input to get the info from the user, 
> and then convert it to a number.
>         numbers=int(raw_input("How many number do you want me to 
> calculate? "))

Does that mean input() is obsolete (after all, Zelle's book is not the 
freshest on the shelf)? Or do they have different uses?

Thanks,

David


More information about the Tutor mailing list