input: Write a function to print out Pascal's triangle for a given number of rows. The function should handle all integer inputs and print each row of the triangle. If the input number of rows is less than 1, the function should print nothing.
  assert pascal_triangle(5)==None
  assert pascal_triangle(0)==None
  assert pascal_triangle(3)==None
  assert pascal_triangle(-1)==None
  assert pascal_triangle(7)==None
output: def pascal_triangle(n):
      if n < 1:
          return
      for i in range(n):
          row = [1] * (i + 1)
          for j in range(1, i):
              row[j] = prev_row[j-1] + prev_row[j]
          prev_row = row
          print(' '.join(map(str, row)))