You are viewing a single comment's thread. Return to all comments →
from collections import OrderedDict od = OrderedDict() for _ in range(int(input())): word = input() if word in od: od[word] += 1 else: od[word] = 1 print(len(od)) print(*od.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 →