So we ask the user to input a number and match that number in a list:
numbers = [1, 2, 3]
num_words = ['One', 'Two', 'Three']
print('Type a number from 1 -3: ')
user = int(input())
if user in numbers:
print(f"{user} is the digit you typed " + ???)
Once that is done I'd like to match what the user typed that was found in the numbers list and print out the corresponding index value in the next list.
So the user types in 1 and it checks numbers and if it finds it, it would print: One from the num_words list to the user.
I also tried a dictionary, but couldn't figure out how to show the matching value to the user based on their input and matching to the dict key:
nums = {1: 'One', 2: 'Two', 3: 'Three'}
print ('Type 1, 2, or 3: ')
user = int(input())
if user in nums.keys():
print(num.values) #Need it to print the nums.value based on the users input at match to nums.keys
else:
print('Goodbye!')
However, my Google searching isn't finding anything similar to what I'm trying to do. I found topics on here (example: Stackover Flow Tpoic, Stackover Flow topic 2, but it didn't help because as far as I could understand (and current understanding of Python) it didn't 100% match what I was trying to do.