How to covert ASCII to integer in Python?

John Machin sjmachin at lexicon.net
Thu Feb 22 19:15:57 EST 2007


On Feb 23, 5:23 am, "John" <rds1... at sh163.net> wrote:
> I just found ord(c), which convert ascii to integer.

ord('\xff') -> 255
ord(unichr(666)) -> 666

What ascii?

What is stopping you from reading the documentation section on built-
in functions (http://docs.python.org/lib/built-in-funcs.html)?

That way, you might find an answer to whatever your question really
is, without wasting time (yours and that of others trying to guess).

>
> Anybody know what the reverse is?
>
> "John" <rds1... at sh163.net> wrote in message
>
> news:erkknl$6d4p$1 at netnews.upenn.edu...
>
> > Is there any built in function that converts ASCII to integer or vice
> versa
> > in Python?
>
> > Thanks!





More information about the Python-list mailing list