print (chr (65))
print (chr (1200))
Running the above code, the program will return the result:
a
A
Ұ
Try an example with (i) outside the program's allowable scope:
print (chr (-1))
Immediately we have the result ValueError:
Traceback (most recent call last):
File "", line 1, print
print (chr (-1))
ValueError: chr () arg not in range (0x110000)
See more:
Last lesson: callable () function in Python
Next lesson: classmethod () function in Python