Is there a nice way to write code so that if someone type in the int 1 I want to return the string "one" and if they type 2 return "two" and so on.
it does not have to be infinity
I was thinking to have 2 lists:
[1, 2, 3, 4, 5, 6]
["one", "two, "three", "four", "five", "six"]
and the somehow loop through them.
Instead of having to write:
if input == 1:
return "one"
elif input == 2:
return "two"
an so on.....
Someone have a nicer way maybe?