Can't understand what python wants from me

Chris Hulan chris.hulan at gmail.com
Thu Jan 29 17:32:16 EST 2009


On Jan 29, 4:50 pm, Oleksiy Khilkevich <g... at asu.ntu-kpi.kiev.ua>
wrote:
> Hello, everyone,
> This may be a totally noob question, but since I am one, so here is it.
>
> I have the following code (not something much of):http://paste.debian.net/27204
> The current code runs well, but the problem is with input value:http://paste.debian.net/27205
> Аs you can see, the numbers are ok, but strings and characters cause
> "not defined" error.
>
> I've obviously missing something important, but tutorial says nothing
> about this.
>
> Thank you for your help.

You want raw_input()

input() expects the string enterd to be Python code, which it evals()
numbers eval to thenmselves

cheers



More information about the Python-list mailing list