[Tutor] ASCII characters

D. Hartley denise.hartley at gmail.com
Tue May 24 20:09:29 CEST 2005


I have a question: what is the "opposite" of hex()? (i.e., like ord
and chr).  If I have

'0x73', how can I get back to 115 or s?

Thanks!
~Denise

> You need the ord() function and maybe hex() also:
>  >>> ord('s')
> 115
>  >>> hex(ord('s'))
> '0x73'
> 
> Kent
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>


More information about the Tutor mailing list