I've done a bit of looking around, and couldn't find an answer to my question, so I'd like some help. In my program, the user inputs a letter, say 'G', and I need the program to print the value stored in the variable G. Such as:
G = 'Hello!'
variable = input('Enter a letter').upper()
I then want the program to print 'Hello!' when the user enters the letter G, but I'm unsure how to do this. I did come across the exec() function (which may be useful?), but I don't understand it enough to do anything with it.
Any help would be appreciated.