Python ord() function
Published February 16, 2022Python's ord() method outputs the Unicode code of a specified character. This function takes a unit-length text as an input and outputs the Unicode equivalent of the passed parameter.
Syntax
The following is the syntax of the ord() function.
ord(the Unicode character) |
The Python ord() Example
In this example, we are going to find the unicode code of characters "C" and "F".
a = ord("C") |
Output
67 70 |
Article Contributed By :
|
|
|
|
228 Views |