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)

Updated on: 25-Feb-2020

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started