← Back to the lesson: List Comprehensions
Simple List Comprehension
The exercise
Create a list of numbers from 1 to 5 using list comprehension.
Result should be: [1, 2, 3, 4, 5]
Print the list.
Starter code
# Create list from 1 to 5 / Создайте список от 1 до 5
numbers =
# Print / Выведите
Write the code in the browser and run it — no installation needed.