Computer >> Computer tutorials >  >> Programming >> Python

How to convert an integer to an ASCII value in Python?


ASCII character associated to an integer is obtained by chr() function. The argument for this function can be any number between 0 to 0xffff

>>> chr(0xaa)
'ª'
>>> chr(0xff)
'ÿ'
>>> chr(200)
'È'
>>> chr(122)
'z'