itoa() ?

Erik Max Francis max at alcyone.com
Fri Jan 11 00:33:55 EST 2002


yvan wrote:

> I would like to retrieve a character value from its integer ASCII
> value.
>
> For example:
> 72 would give me the letter H

You want chr:

Python 2.1.1 (#6, Sep  2 2001, 10:26:49) 
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> chr(72)
'H'


itoa is a non-Standard C function that does something totally unrelated.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Laws are silent in time of war.
\__/ Cicero
    Esperanto reference / http://www.alcyone.com/max/lang/esperanto/
 An Esperanto reference for English speakers.



More information about the Python-list mailing list