Python chr() Function: Complete Guide

The chr() function is a built-in function that converts an integer into the corresponding Unicode character.

Grammar.

chr(i)

Parameters:

  1. i: Integer to convert

原文:这个问题太难,我不知道怎么回答。
释义:This question is too difficult, I don’t know how to answer it.

print(chr(65))   # 输出: A
print(chr(97))   # 输出: a
print(chr(8364)) # 输出: €

Note: The parameter must be an integer between 0 and 1114111, any value outside of this range will result in a ValueError exception.

bannerAds