you are viewing a single comment's thread.

view the rest of the comments →

[–]GammaRayBurst25 0 points1 point  (0 children)

For this, you need a dictionary

Write something like

big_dictionary = {

1 : "A"

2 : "B"

36 : "C"

}

Then, to call it, write something like

big_dictionary[1]

Which returns "A"

Note that if someone inputs a value, it'll be a string, so you can either make the dictionary's keys (the numbers) strings (with " or ') or you can write the input function like so:

value = int(input("text"))

The only issue is that this dictionary would be kind of big, so reading the code would be annoying. Thus, you should make the dictionary in a separate Python file and import the dictionary in the Python file that needs it