input: Write a python function to print Pascal's triangle up to n rows.
  assert print_pascal_triangle(3) == [[1], [1, 1], [1, 2, 1]]
  assert print_pascal_triangle(5) == [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1]]
  assert print_pascal_triangle(1) == [[1]]
output: def print_pascal_triangle(n):
      if n <= 0:
          return []
      
      result = []
      for i in range(n):
          row = [1] * (i + 1)
          for j in range(1, i):
              row[j] = result[i - 1][j - 1] + result[i - 1][j]
          result.append(row)
      
      return result