chr()

Anonymous contributor's avatar
Anonymous contributor
Anonymous contributor's avatar
Anonymous contributor
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]:

us
Visit us
code
Hide code
Code
Output
Hide output
Hide output
Loading...

All contributors

Looking to contribute?

Learn Python on Codecademy