You are viewing a single comment's thread. Return to all comments →
Well, after trying Counter+defaultdict(list) I realized I try a little bit too hard :d
c = Counter(s) for letter, value in sorted(c.items(), key = lambda el: (-el[1], el[0]))[:3]: print(letter, value)
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 →
Well, after trying Counter+defaultdict(list) I realized I try a little bit too hard :d