input: 
  from typing import List
  
  def PascalTriangle(n: int) -> List[List[int]]:
      """
      Generate and return the Pascal's Triangle up to n rows.
      Each row in the triangle is represented as a list of integers.
      
      >>> PascalTriangle(5)
      [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1]]
      """
      triangle = []
      for line in range(n):
          row = [1 if i == 0 or i == line else triangle[line-1][i-1] + triangle[line-1][i] for i in range(line+1)]
          triangle.append(row)
      return triangle
  
  # Driver Code
  n = 5
  print(PascalTriangle(n))
  
output:     triangle = []
      for line in range(n):
          row = [1 if i == 0 or i == line else triangle[line-1][i-1] + triangle[line-1][i] for i in range(line+1)]
          triangle.append(row)
      return triangle