input: Write a function to rewrite the following Python code using list comprehensions. The original code initializes an empty list and then iterates through numbers from 1 to 20, appending only the even numbers to the list. The rewritten code should achieve the same functionality using a list comprehension.
  
   python
  def rewrite_with_comprehension():
      even_numbers = [i for i in range(1, 21) if i % 2 == 0]
      return even_numbers
  
  assert rewrite_with_comprehension() == [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
  
output: def rewrite_with_comprehension():
      even_numbers = [i for i in range(1, 21) if i % 2 == 0]
      return even_numbers