input: Write a function to generate the first n elements of the Sierpinski triangle. The function should print the Sierpinski triangle as a series of binary digits.
  def sierpinski_triangle(n): 
      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() 
  assert sierpinski_triangle(6)
output: def sierpinski_triangle(n): 
      for i in range(n): 
          for j in range(2**n): 
              if j & (2**i): 
                  print('1', end=" ") 
              else: 
                  print('0', end=" ") 
          print()