The ord()
function is used to return the Unicode integer code of a specified character. The function takes a string containing a single character as its only argument.
syntax:
ord(character)
The argument given should strictly be a single character.
The chr function serves the opposite purpose, where you give it an integer argument and it returns the unicode character represented by the integer.