input: 
  from typing import List
  
  def PascalTriangle(n: int) -> List[List[int]]:
      """ Generates Pascal's Triangle up to n rows and returns it as a list of lists.
      Each sublist represents a row in Pascal's Triangle.
      >>> PascalTriangle(5)
      [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1]]
      >>> PascalTriangle(1)
      [[1]]
      >>> PascalTriangle(0)
      []
      """
      if n == 0:
          return []
      
      triangle = [[1]]
      for line in range(1, n):
          current_row = [1]
          for i in range(1, line):
              current_row.append(triangle[line-1][i-1] + triangle[line-1][i])
          current_row.append(1)
          triangle.append(current_row)
      
      return triangle
  
output:     if n == 0:
          return []
      
      triangle = [[1]]
      for line in range(1, n):
          current_row = [1]
          for i in range(1, line):
              current_row.append(triangle[line-1][i-1] + triangle[line-1][i])
          current_row.append(1)
          triangle.append(current_row)
      
      return triangle