chr()

Returns Unicode characters represented by integers ranging between 0 and 1,114,111.

Syntax

chr(integer)

Example 1

Use chr() to return the Unicode character represented by the integer 5:

print(chr(5))

Example 2

Use chr() to return the Unicode character represented by the list [67, 111, 100, 101, 99, 97, 100, 101, 109, 121]:

Interested in helping build Docs? Read the Contribution Guide or share your feedback.

Learn Python on Codecademy