You are viewing a single comment's thread. Return to all comments →
s = input() c=Counter(s).items() s=sorted(list(c), key=lambda item: (-item[1], item[0]))[:3] [print(_[0],_[1]) for _ in s]
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 →