You are viewing a single comment's thread. Return to all comments →
from collections import Counter s=input() freq_let=Counter(s) for entry in freq_let.most_common(3): print(*entry)
In this question by using most_common makes the code very understandable and is less time taking....
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 →
from collections import Counter s=input() freq_let=Counter(s) for entry in freq_let.most_common(3): print(*entry)
In this question by using most_common makes the code very understandable and is less time taking....