LearnPy Hub
← Comprehensions problems
Easy

Number the Words

Read words and print a list of strings 1:word, 2:word, … using a comprehension with enumerate(words, 1).

Input

Words separated by spaces.

Output

A Python list.

Sample 1

Input
a b c
Output
['1:a', '2:b', '3:c']

Sample 2

Input
hello
Output
['1:hello']
solution.py
Output appears here
Number the Words · Python practice problem · LearnPy Hub