chr()

christian.dinh's avatar
Published Jun 19, 2021Updated Sep 3, 2021
Contribute to Docs

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]:

Code
Output
Loading...

All contributors

Contribute to Docs

Learn Python on Codecademy