# The ord() function returns an integer representing the Unicode character.
res = ord('A')
print(res)
# output 65
# ord('a') means 'get unicode of a'
ord('a') = 97
# chr(97) is the reverse, and means 'get ascii of 97'
chr(97) = 'a'
# to get the int val of a single digit represented as a char, do the following:
# ord(single_digit_char) - ord('0') = single_digit_int
ord('5') - ord('0') = 5
ord('3') - ord('0') = 3
'''note the integer representation of unicode character
of capital letters and small letters are completely different'''
# example
print( ord('A') ) # output 65
print( ord('a') ) # output 97
#Find position in alphabet
ord('a') - 96
Output: 1
# Convert ASCII Unicode Character 'A' to 65
y = ord('A')
print(type(y), y)
alphabet_list = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
# Print 65-90
for i in alphabet_list:
print(ord(i), end = " , ")
Unicode = ord('0')
print(Unicode)
#output
#48