Python ord() built-in function
From the Python 3 documentation
Given a string representing one Unicode character, return an integer representing the Unicode code point of that character.
Introduction
The ord() function is the inverse of chr(). It takes a single character string and returns its Unicode code point, which is an integer.
Examples
# Get the Unicode code point of a character
print(ord('A'))
print(ord('€'))
print(ord('1'))
print(ord('a'))
65
8364
49
97