input: Write a function to print Pascal's triangle for a given number of rows. If the input number of rows is less than 1, the function should return immediately without printing anything.
  assert pascal_triangle(5)==None
  assert pascal_triangle(0)==None
  assert pascal_triangle(3)==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)))