LearnPy Hub
← Dictionaries problems
Easy

Word Frequency

Read a line of words and print a dictionary of how many times each word appears (case-sensitive, in first-seen order).

Input

One line.

Output

A dictionary.

Sample 1

Input
a b a c b a
Output
{'a': 3, 'b': 2, 'c': 1}

Sample 2

Input
hello
Output
{'hello': 1}
solution.py
Output appears here
Word Frequency · Python practice problem · LearnPy Hub