0
GAME
def get_input(): command = input(": ").split() verb_word = command[0] if verb_word in verb_dict: verb = verb_dict[verb_word] Please help me understand verb = verb_dict[verb_word]
1 Answer
0
it's basically extraction of value using a key say I have a dictionary
d={'hello':'world'}
where key-->hello and value-->world so
print d['hello'] prints world
similarly in your code you are checking if a word exist or not in dictionary and extracting it's value if exist