input: Write a function to generate the first n elements of the Sierpinski triangle. The function should return the Sierpinski triangle as a 2D list of strings representing the binary structure of the triangle. If n is 0, return an empty list.
  assert sierpinski_triangle(0) == []
  assert sierpinski_triangle(1) == [["1"]]
  assert sierpinski_triangle(2) == [["1"], ["1", "1"]]
  assert sierpinski_triangle(3) == [["1"], ["1", "1"], ["1", "0", "1"]]
  assert sierpinski_triangle(4) == [["1"], ["1", "1"], ["1", "0", "1"], ["1", "1", "1", "1"]]
output: def sierpinski_triangle(n):
      if n == 0:
          return []
      triangle = [["1"]]
      for i in range(1, n):
          prev_row = triangle[-1]
          new_row = ["1"]
          for j in range(1, len(prev_row)):
              new_row.append(str(int(prev_row[j-1]) ^ int(prev_row[j])))
          new_row.append("1")
          triangle.append(new_row)
      return triangle