List comprehensions create lists in one line.
squares = []
for x in range(5):
squares.append(x ** 2)
squares = [x ** 2 for x in range(5)]
[0, 1, 4, 9, 16]
[expression for item in iterable]
Create a list of the first 10 positive integers doubled (2, 4, 6, ..., 20) using a list comprehension. Print the result.
Run your code to see output