Python’s ord() function accepts a single unit of character and returns the equivalent Unicode of the passed argument. In other words, the `ord()` function can take a string or character of length one and returns an integer representing the Unicode of that string. The function is nothing but the inverse of the **[Python chr()](https://itsmycode.com/python-ord-a-step-by-Step-guide) function. If the argument passed to the function is more than 1 character, Python will raise a **TypeError: ‘ord() expected a character, but string of length 2 found’