You are viewing a single comment's thread. Return to all comments →
n = int(input()) words = {} for _ in range(n): word = str(input()) if word not in words: words[word] = 1 else: words[word] += 1 word_list = [str(i) for i in list(words.values())] print(len(words.keys())) print(' '.join(word_list))
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 →