Python – Unicode Code Point for Unicode Character – ord() Function with Examples

ord() function is used to find the an integer representing Unicode code point for the given Unicode character in Python for the given input.

ord() function is a part of Python Built-in Functions.

Syntax of ord() Function

The syntax of ord() function in Python is:

ord(c)

 

Parameters of ord() Function in Python

x – Where x is any valid . This parameter is required.

 

Compatibility

ord() function is available and compatible with both Python 2.x and 3.x.

 

Return Value of ord() Function in Python

ord() function returns an integer representing Unicode code point for the given Unicode character for the given input.

 

Python ord() Function Example 1

Example CODE

Output:

 

Python ord() Function Example 2

Example CODE

Output: