I'm just wondering if it's possible to see if the users input equals an item's index within a list?
I am trying to do something like this:
data = ['hello', 'hi', 'hey']
user_choice = int(input("Enter 1,2 or 3: ")
user_answer = user_choice - 1
if user_answer in ....: # How would I finish this off line off?
result = data[user_answer]
print(result)