How can I turn a string, say 'a' into a variable name on which I can use the append function?
I am trying to take the input, which is made ut of only small letters of the alphabet and record the posision of the letter in the string with a number under a variable of the letters name. The problem i have encountered is that I have to turn the string that i have from the input into a variable name that i can use the append funtion on. I have tried using vars() after I saw it somewhere (don't really know what vars() does since I'm new to this). This worked fine sometimes, but not always. Now I'm looking for a better way to do it.
'''This is the code i have now. This does not work all the time'''
ord = input()
count = 1
for i in ord:
i = vars()[i]
i.append(count)
count = count + 1
i = []