This ord()
function returns an integer representing the code of the character.
ord(character)
Here,
Note: If a Unicode argument is given and Python was built with UCS2 Unicode, then the character’s code point must be in the range [0 to 65535] inclusive; otherwise the string length is two, and a TypeError will be raised.
>>> ord('a')
97
>>> ord('A')
65
>>> ord(u'a')
97
>>> ord(u'\\u2020')
8224