input: Write a function to generate Pascal's triangle and print out the triangle for a given number of rows. The function should take an integer `n` as input and print each row of the triangle. If `n` is less than 1, the function should print an empty list.
  assert pascal_triangle(5) == None
  assert pascal_triangle(1) == None
  assert pascal_triangle(0) == None
  assert pascal_triangle(-1) == None
output: def pascal_triangle(n):
      if n < 1:
          print([])
          return
      triangle = [[1]]
      for i in range(1, n):
          row = [1]
          for j in range(1, i):
              row.append(triangle[i-1][j-1] + triangle[i-1][j])
          row.append(1)
          triangle.append(row)
      for row in triangle:
          print(row)