int value of char python code example
Example 1: python int to char
output = chr(99)
print(output)
# c
output = str(5)
print(output)
# 5
Example 2: int ot char python
print(ord('a'))
#Output
97
Example 3: get int value of char python
# ord(single_digit_char) - ord('0') = single_digit_int
ord('5') - ord('0') = 5 # 5 is an int
ord('3') - ord('0') = 3 # 3 is an int