Aug-15-2017, 04:49 PM
items = { "Ryanair": 6, "AAL": 11 } thing = input("Check which? ") if thing in items: print(items[thing]) else: print("Invalid input")How's that? It's just a map of keys to the number they associate to, and prints it when someone types in the key.