You are viewing a single comment's thread. Return to all comments →
from collections import OrderedDict input_dict = OrderedDict() for _ in range(int(input())): word = input() try: input_dict[word] += 1 except KeyError: input_dict[word] = 1 print(len(input_dict)) for val in input_dict.values(): print(val, end = " ")
Seems like cookies are disabled on this browser, please enable them to open this website
Word Order
You are viewing a single comment's thread. Return to all comments →