Jan-01-2017, 12:54 AM
class smart_dict(dict): def __missing__(self, key): return key def Tavern(): print('Typed 1') def preArena(): print('Typed 2') def Quest_Board(): print('Typed 3') def Potion_Shop(): print('Typed 4') def Blacksmith(): print('Typed 5') options = { '1': ['You enter the Tavern', Tavern, 'Go to the -Tavern'], '2': ['You enter Arena', preArena, 'Go to the - Arena'], '3': ['You walk to the Quest Board', Quest_Board, 'Go to the - Quest Board'], '4': ['You enter the Potion Shop', Potion_Shop, 'Go to the - Potion Shop'], '5': ['You enter the Blacksmith', Blacksmith, 'Go to the - Blacksmith'] } smart_dict(options) while True: n=1 print() for key, value in options.items(): print('{}.) {}'.format(n, value[2])) n += 1 Option = input("-->") if Option == options[Option]: continue print(options[Option][0]) options[Option][1]()I added stubs for the various functions you need to write