Say I have a list:
questions = ['a','b','c','d','e']
And I want to make a variable named after an element in this list:
questions[2] = 'Hello world'
This is the way I thought I could do it but when I try to print it:
print(b)
I get this error:
NameError: name 'b' is not defined
Obviously, python has made an entirely new variable called 'questions[2]'. How can I get python to recognize questions[2] as 'b' and not the 'questions[2]'?