input: Write a function to generate the first n elements of the Sierpinski triangle in Python. The function should print the bit pattern that represents the Sierpinski triangle for the given number of levels n. If n is 0, the function should print nothing.
  assert sierpinski_triangle(0)==None
  assert sierpinski_triangle(1)==None
  assert sierpinski_triangle(2)==None
  assert sierpinski_triangle(3)==None
  assert sierpinski_triangle(6)==None
output: def sierpinski_triangle(n):
      if n == 0:
          return
      triangle = ["0"]
      for i in range(1, n):
          new_triangle = triangle[:]
          for row in triangle:
              new_triangle.append(row + "".join('1' if x == '0' else '0' for x in row))
          triangle = new_triangle
      for row in triangle:
          print(row.replace('0', ' ').replace('1', '*'))