We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
if name == 'main':
s = input()
s_counter = Counter(sorted(s))
top3 = s_counter.most_common(3)
for i, (item, value) in enumerate(top3):
print(item, value)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Company Logo
You are viewing a single comment's thread. Return to all comments →
if name == 'main': s = input() s_counter = Counter(sorted(s)) top3 = s_counter.most_common(3) for i, (item, value) in enumerate(top3): print(item, value)