input: from typing import List
  
  def pascal_triangle(n: int) -> List[List[int]]:
      """ Generate and print Pascal's triangle for a given number of rows.
      Return a list of lists where each list represents a row in the Pascal's triangle.
      
      >>> pascal_triangle(0)
      []
      >>> pascal_triangle(1)
      [[1]]
      >>> pascal_triangle(5)
      [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1]]
      """
      if n <= 0:
          return []
      triangle = [[1]]
      for _ in range(1, n):
          last_row = triangle[-1]
          new_row = [1] + [last_row[i] + last_row[i + 1] for i in range(len(last_row) - 1)] + [1]
          triangle.append(new_row)
      return triangle
output:     if n <= 0:
          return []
      triangle = [[1]]
      for _ in range(1, n):
          last_row = triangle[-1]
          new_row = [1] + [last_row[i] + last_row[i + 1] for i in range(len(last_row) - 1)] + [1]
          triangle.append(new_row)
      return triangle