You are viewing a single comment's thread. Return to all comments →
from collections import Counter if __name__ == '__main__': s = input() count = Counter(s) sort = sorted(count.items(), key = lambda x: (-x[1], x[0])) for a,b in sort[:3]: print(a,b)
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 →