ID EN
Built-in Functions

ord

Python 3.11

Given a string representing one Unicode character, return an integer representing the Unicode code point of that character. For example, ord('a') returns the integer 97 and ord('€') (Euro sign) returns 8364. This is the inverse of chr().

Syntax

PYTHON
ord(c)

See Also

chr()