We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Collections
- Company Logo
- Discussions
Company Logo
Company Logo
Sort by
recency
|
1302 Discussions
|
Please Login in order to post a comment
Did a little digging and found the Counter.most_common(n) method, which returns the list you need to iterate print(*) through. Sorted the string beforehand because .most_common(n) will sort by order of elements encountered.
I did this: