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