Chars

Methods

chr casts an int to a unicode character. if an item passed in is out of range, ValueError is raised.

print(chr(97)) # a
print(chr(65)) # A
print(chr(1200)) # Ұ

ord changes a character to its number representation.

print(ord('5')) # 53
print(ord('A')) # 65
print(ord('$')) # 36