Re: How to covert ASCII to integer in Python?



In article <mailman.1763.1212139351.12834.python-list@xxxxxxxxxx>,
"Skonieczny, Chris" <Skonieczny.C@xxxxxxxxxxxxx> wrote:

YOU SHOULD REMOVE or CORRECT YOUR POST here:
http://mail.python.org/pipermail/python-list/2007-February/427841.html

Why? There's nothing wrong there.

It is not true - eg. try :
a='P' # P is ASCII , isn't it ?
b=int(a)
and what you will get ? An error !!!

You really don't see any difference between
"convert '1' to an integer" and "convert 'P' to an integer"?

In case there's actually a problem you're trying to solve
here, try ord instead of int.

Or probably you yourself should - quote :
"You probably should go through the tutorial ASAP that is located here:

http://docs.python.org/tut/ "

---------------------------------------------------------------------
[Image]

--
David C. Ullrich
.



Relevant Pages