LearnPy Hub
← Comprehensions problems
Easy

Set of Lengths

Read words and print the sorted list of the different word lengths, using a set comprehension.

Input

Words separated by spaces.

Output

A Python list.

Sample 1

Input
a bb cc ddd
Output
[1, 2, 3]

Sample 2

Input
hello world
Output
[5]
solution.py
Output appears here
Set of Lengths · Python practice problem · LearnPy Hub