You are viewing a single comment's thread. Return to all comments →
x = int(input()) dic = {}
for i in range(x): a = input().split(' ', 1) dic[a[0]] = a[1]
try: while True: a = input() if len(a) > 0: if a in dic: print(f'{a}={dic[a]}') else: print('Not found') except EOFError: pass
Seems like cookies are disabled on this browser, please enable them to open this website
Day 8: Dictionaries and Maps
You are viewing a single comment's thread. Return to all comments →
Reading phonebook entries
Handling multiple queries safely until EOF