Python ord() Function

Example

Returns the integer representing the character "E":

x = ord("E")

Running Instance

Definition and Usage

The ord() function returns a number representing the Unicode encoding of the specified character.

Syntax

ord(character)

Parameter Value

Parameter Description
character String, any character.

Related Pages

Reference Manual:chr() Function(Converted back to character through chr() function)