LearnPy Hub
← Comprehensions problems
Easy

Length Dictionary

Read words and print a dictionary mapping each word to its length.

Input

One line of words.

Output

A dictionary.

Sample 1

Input
tea rice
Output
{'tea': 3, 'rice': 4}

Sample 2

Input
a
Output
{'a': 1}
solution.py
Output appears here
Length Dictionary · Python practice problem · LearnPy Hub