input: Write a function to generate the first n elements of the Sierpinski triangle in Python. The function should print the bits of each row of the triangle.
  assert sierpinski_triangle(1)==print('1')
  assert sierpinski_triangle(2)==print('1 1') and print('1 0')
  assert sierpinski_triangle(3)==print('1 1 1') and print('1 0 1') and print('1 1 0')
  assert sierpinski_triangle(4)==print('1 1 1 1') and print('1 0 1 0') and print('1 1 0 1') and print('1 0 0 0')
  sierpinski_triangle(6)
output: def sierpinski_triangle(n):
      if n == 0:
          return
      row = [1]
      for _ in range(n):
          print(' '.join(map(str, row)))
          new_row = [1]
          for i in range(1, len(row)):
              new_row.append(row[i-1] ^ row[i])
          new_row.append(1)
          row = new_row