About 658 letters
About 3 minutes
Description: Convert a single Unicode character string to its integer code. See also the chr function.
def ord(x: str):
'''
Convert a single Unicode character string to its integer code
:param x: A single Unicode character string
:return: The code of the single Unicode character
'''
Example:
print('The code of A is', ord('A'))
print('The code of 甲 is', ord('甲'))
Created in 5/15/2025
Updated in 5/16/2025