You are viewing a single comment's thread. Return to all comments →
from collections import OrderedDict if __name__ == '__main__': ord_dict = OrderedDict() n = int(input()) #inp = list() for i in range(n): inp = input() if inp in ord_dict: ord_dict.update({inp:ord_dict.get(inp)+1}) else: ord_dict.update({inp:1}) print(len(ord_dict)) print(*ord_dict.values())
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 →