# # # wct = {} # w = dict() while True: try: w = input("word> ") except EOFError: break except: print("No clue what's going on, but something went wrong") break w = w.strip() if w in wct: wct[w] = wct[w] + 1 else: wct[w] = 1 for i in list(wct.keys()): print(i, wct[i])