I have some code like:
G = 'Hello!'
variable = input('Enter a letter').upper()
I then want the program to print 'Hello!'
when the user enters the letter G. How can I do this? Is exec()
useful for the task? I saw some mentions of it, but I didn't understand how to use it.