input: from typing import List
  
  def generate_even_numbers(n: int) -> List[int]:
      """ Given a positive integer n, generate a list of even numbers from 1 to n using list comprehension.
      >>> generate_even_numbers(20)
      [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
      >>> generate_even_numbers(15)
      [2, 4, 6, 8, 10, 12, 14]
      """
      
output:     return [i for i in range(1, n + 1) if i % 2 == 0]