So I just went into python not too long ago, it is to develop my OCR project. I want the software to detect the character "A" and convert it to a set of integers like 101.
list=['haha', 'haaa']
I am thinking of using a dictionary with keys and item to try replacing it. I added a define function for the process. I use this method I found in other post but it doesn't work.
Dictionary={'a':101,'h':111}
for a,b in Dictionary.items():
list = list.replace(a.lower(),b)
print (list)
ordon a single character, it will return it's ascii ID.