You cannot compare 'a', which is of type str, with 97, which is of type int.
'a'
str
97
int
To do that, you need to convert 97, which is an integer, into a character using the chr() function.
chr()
>>> print('a' == chr(97)) True