slinkp23 at yahoo.com
Thu Oct 25 09:30:38 CEST 2001
On 24 Oct 2001 23:21:21 -0700, Shankar <SNeelakantan_C at zaplet.com> wrote:
>I started learning python recently and the examples given on
>python.org only talk about number comparison.
>x = input("Proceed?");
>if x == 'y':
> print "You typed y\n";
>This gives out a syntax error.
It should give you a name error.
What you want is raw_input, not input.
Doc strings are really helpful for seeing what somethign does:
>>> print input.__doc__
input([prompt]) -> value
Equivalent to eval(raw_input(prompt)).
More information about the Python-list