Python ord() Function

The ord() function in Python returns the number representing the Unicode code of a specified character.

Syntax

Parameter

c: This parameter represents a string or any character.

Return

This function returns the number representing the Unicode code of a specified character.

Example 1

Output

Example 2

Output

 

Pin It on Pinterest

Share This