Home » ord() in Python | Python ord() Function with Examples

ord() in Python | Python ord() Function with Examples

by Online Tutorials Library

Python ord() Function

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

Signature

Parameters

character: A character string of length 1.

Return

It returns an integer that represents Unicode code point for the given Unicode character.

Python ord() Function Example 1

The below example shows the working of ord().

Output:

56  82  38  

Explanation: In the above example, it returns an integer representing Unicode code point for the given Unicode character.


You may also like