LearnPy Hub
← Strings problems
Hard

Word Frequency

Count how often each word appears (case-insensitive). Print word: count for each word in the order it first appears.

Input

One line of words separated by spaces.

Output

One line per distinct word.

Sample 1

Input
the cat and the hat
Output
the: 2
cat: 1
and: 1
hat: 1

Sample 2

Input
Hi hi HI there
Output
hi: 3
there: 1
solution.py
Output appears here
Hints
Word Frequency · Python practice problem · LearnPy Hub