Dec-31-2016, 10:03 PM
As the tittle states I want to shorten a piece of my code into something like a dictonary, im fairly new to python and dont really know how to go about this so any help or an example would be great.
print (" Go to the -") print ("1.) Tavern") print ("2.) Arena") print ("3.) Quest Board") print ("4.) Potion Shop") print ("5.) Blacksmith") Option = input("-->") if (Option == "1"): print("You enter the Tavern") Tavern() elif (Option == "2"): print("You enter Arena") preArena() elif (Option == "3"): print("You walk to the Quest Board") Quest_Board() elif (Option == "4"): print("You enter the Potion Shop") Potion_Shop() elif (Option == "5"): print("You enter the Blacksmith") Blacksmith()