Error with int()
Oleg Broytmann
phd at phd.pp.ru
Sat Sep 29 08:31:21 EDT 2001
On Sat, Sep 29, 2001 at 01:50:34PM +0200, Arturo PИrez Mulas wrote:
> I am running python 2.1.1 under Windows XP BETA, and get the following
> error:
>
> >>> int('a')
> Traceback (most recent call last):
> File "<interactive input>", line 1, in ?
> ValueError: invalid literal for int(): a
>
> Help anyone? Thank you
'a' is stringand caanot be converted to an int. What do you want to
achive? Get ASCII value? ord('a').
Oleg.
----
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list
mailing list