On this page
chr
Prev: callable | Up: __builtins__ | Next: classmethod
Rel: ascii, bin, format, hex, oct
Ref: docs.python.org โ chr
Tags: #public #python3 #builtins
Import & Availability
# Built-in (available globally without import)
from builtins import chr
Overview & Signature
chr(i, /)
Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff.
Usage
assert chr(65) == "A"
assert chr(0x03C0) == "ฯ"
assert chr(0x1F40D) == "๐"
Gotchas
- Inverse of
ord(): Valid Unicode code points are0..0x10FFFF; outside raisesValueError.
REPL Inspect
help(chr)
Linked from
- tuts/python3/__builtins__
- tuts/python3/__builtins__/__builtins__
- tuts/python3/__builtins__/ascii
- tuts/python3/__builtins__/bin
- tuts/python3/__builtins__/callable
- tuts/python3/__builtins__/classmethod
- tuts/python3/__builtins__/format
- tuts/python3/__builtins__/hex
- tuts/python3/__builtins__/oct
- tuts/python3/__builtins__/ord
Related notes
- tuts/python3/__builtins__/__builtins__ Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__/ascii Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__/bin Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__/callable Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__/classmethod Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__/format Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__/hex Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__/oct Linked here; links to this page; shared tags: #builtins
- tuts/python3/__builtins__ links to this page; shared tags: #builtins
- tuts/python3/__builtins__/ord links to this page; shared tags: #builtins