Parametric Python Function
Hi all, I would like to code a parametric input function that can understand which dictionary it has to go to take "input_text" text for dictionary input command at the beginning and can print output from specified dictionary at the end. Can you help me about it ? Thank you! nutrition = {1: "Carnivorous", 2: "Herbivorous", 3: "Omnivorous", 4: "No Information", input_text: """Please Enter Nutrition Type 1. Carnivorous 2. Herbivorous 3. Omnivorous 4. No Information\n"""} respiratory = {1: "with Oxygen", 2: "without Oxygen", 3: "No Information", input_text: """Please Enter Respiratory Type 1. with Oxygen 2. without Oxygen 3. No Information\n"""} y = input(respiratory["input_text"]) if y == "1": selection = respiratory["1"] print(selection) elif y == "2": selection = respiratory["2"] print(selection) elif y == "3": selection = respiratory["3"] print(selection) else: print("WARNING")