How to convert an integer to a unicode character in Python?



Python library’s chr() function converts Unicode character associated to any interger which is between 0 an 0x10ffff.

>>> chr(36)
'$'
>>> chr(97)
'a'
>>> chr(81)
'Q'



Advertisements