Function Details: ord

Description


Returns the Unicode code point for a one-character string.


Extended Description


The ord() function returns an integer representing the Unicode code point of a given character. It takes a single character as an argument and returns the corresponding Unicode code point. This function is the inverse of chr().


Read More about ord from Python Documentation

Function Signature


ord(c: str) -> int

Module: builtins

Parameters



Parameter List


  • c: str

Return


Returns an integer representing the Unicode code point of the given character.


Return Type


int

Output

Explanation

This example shows the Unicode code points for various ASCII characters.