Back
I want to get, given a character, its ASCII value.
For example, for the character a, I want to get 97, and vice versa.
You can use chr() and ord():
>>> chr(97) 'a' >>> ord('a') 97
>>> chr(97)
'a'
>>> ord('a')
97
31k questions
32.8k answers
501 comments
693 users