Python ord() Function

Example

Returns the integer representing the character "E":

x = ord("E")

Run 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 by chr() function)