Input: even_numbers = []
for i in range(1,21):
if i % 2 == 0:
even_numbers.append(i)
Output: even_numbers = [i for i in range(1, 21) if i % 2 == 0]
Prompt: Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Rewrite the following Python code by introducing list comprehensions.
### Input:
even_numbers = []
for i in range(1,21):
if i % 2 == 0:
even_numbers.append(i)
### Output:
even_numbers = [i for i in range(1, 21) if i % 2 == 0]