All problems
MediumDicts
Count word frequencies
Count how many times each word appears in a sentence. Print the dict.
- #dict
- #count
Sample input
"the cat sat on the mat"
Sample output
{'the': 2, 'cat': 1, 'sat': 1, 'on': 1, 'mat': 1}dict-count-words.py
Output
Press "Run code" to execute.
