All problems
MediumData Structures
collections.Counter — top words
Use `Counter` to find the 2 most-common words in a sentence.
- #counter
- #frequency
Sample input
"a b a c b a"
Sample output
[('a', 3), ('b', 2)]counter-frequency.py
Output
Press "Run code" to execute.
