You are viewing a single comment's thread. Return to all comments →
n = int(input()) arr = [] for i in range(n): arr.append(input()) K = (sorted(set(arr), key = arr.index )) count = [] for i in range(0,len(K)): count.append(0) for j in range(0,len(arr)): if(K[i] == arr[j]): count[i] = count[i] + 1 print(len(K)) print(*count, sep=" ")
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 →