ord()
Built-in FunctionPython 2.0+Intermediate
Returns the Unicode code point for a single character
Quick Info
- Documentation
- Official Docs
- Python Version
- 2.0+
Learn by Difficulty
Quick Example
python
print(ord("A")) print(ord("a")) print(ord("0"))
ord() is a built-in function that returns the unicode code point for a single character.
Try in PlaygroundTags
builtinfunctioncorestringunicode