input: def sierpinski_triangle(n: int) -> None:
      """
      Generates the first n elements of the Sierpinski triangle and prints them.
      >>> sierpinski_triangle(6)
          1 
         1 1 
        1 0 1 
       1 1 1 1 
      1 0 0 0 1 
     1 1 0 0 1 1 
      """
      for i in range(2**n):
          print(' ', end=" ")
      
      for i in range(1, n+1):
          for j in range(2**(i-1), 2**i):
              print('1', end=" ")
          print()
          
          if i > 1:
              for j in range(2**(i-1)+1, 2**i-1):  
                  print('0', end=" ")
              print()
output:     
      triangle = [1]
      for _ in range(n):
          print(' ' * (n - len(triangle)) + ' '.join(map(str, triangle)))
          new_triangle = [1]
          for i in range(1, len(triangle)):
              new_triangle.append(triangle[i-1] ^ triangle[i])
          new_triangle.append(1)
          triangle = new_triangle
  