Error with int()

Magnus Lie Hetland mlh at idi.ntnu.no
Sat Sep 29 17:30:28 EDT 2001


"maxm" <maxmcorp at worldonline.dk> wrote in message
news:Coqt7.2534$Mk2.201498 at news000.worldonline.dk...
> "Arturo Pérez Mulas" <arturo_perez at wanadoo.es> wrote in message
>
> > I am running python 2.1.1 under Windows XP BETA, and get the following
> > error:
> >
> > >>> int('a')
>
> You cannot make an int from a string that doesnt represent a legal number.

Perhaps ord() was what's needed?

>>> ord('a')
97

> regards Max M

--

  Magnus Lie Hetland         http://www.hetland.org

 "Reality is that which, when you stop believing in
  it, doesn't go away."           -- Philip K. Dick






More information about the Python-list mailing list