input: def sierpinski_triangle(n: int):
      """
      Generate the first n rows of the Sierpinski triangle. The Sierpinski triangle
      is a fractal and attractive fixed set with the overall shape of an equilateral
      triangle, subdivided recursively into smaller equilateral triangles.
      >>> sierpinski_triangle(6)
        1
       0 1
      1 0 1
     0 1 1 0
    1 0 0 0 1
   0 1 0 1 0 1
      """
      for i in range(n):
          print(" " * (n - i - 1), end="")
          for j in range(2**i):
              if j % 2 == 0:
                  print("1", end=" ")
              else:
                  print(" ", end="")
          print()
output:     for i in range(n):
          print(" " * (n - i - 1), end="")
          for j in range(2**i):
              if j % 2 == 0:
                  print("1", end=" ")
              else:
                  print("0", end=" ")
          print()