input: Write a python function to generate Pascal's triangle and return it as a list of lists.
  assert generate_pascal_triangle(5) == [
      [1],
      [1, 1],
      [1, 2, 1],
      [1, 3, 3, 1],
      [1, 4, 6, 4, 1]
  ]
  assert generate_pascal_triangle(3) == [
      [1],
      [1, 1],
      [1, 2, 1]
  ]
  assert generate_pascal_triangle(1) == [
      [1]
  ]
output: def generate_pascal_triangle(n):
      triangle = []
      for i in range(n):
          row = [1] * (i + 1)
          for j in range(1, i):
              row[j] = triangle[i - 1][j - 1] + triangle[i - 1][j]
          triangle.append(row)
      return triangle