Python:Ascii character<->decimal representation conversion
num=ord(char)
char=chr(num)
For example,
>>> ord('a')
97
>>> chr(98)
'b'
You can read more about the built-in functions in Python here.
Use ord
to convert a character into an integer, and chr
for vice-versa.
ord