input: from typing import List
  
  def factorial_generator(numbers: List[int]) -> List[int]:
      """ Generate the factorial for each number in the list.
      >>> factorial_generator([7])
      [5040]
      >>> factorial_generator([3, 5, 2])
      [6, 120, 2]
      """
output:     from math import factorial
      return [factorial(num) for num in numbers]