input: Write a function to generate the first n elements of the Sierpinski triangle. The function should print a visual representation of the Sierpinski triangle using binary digits '1' and '0'. If n is provided, the function should generate and display the first n rows of the Sierpinski triangle. If n is not provided, the function should generate the Sierpinski triangle based on the default value.
  assert sierpinski_triangle(6)
  assert sierpinski_triangle(3)
output: def sierpinski_triangle(n=3):
      if n <= 0:
          return
      triangle = ["0"]
      for i in range(1, n):
          new_row = "0"
          for j in range(1, len(triangle[i-1])):
              new_row += str(int(triangle[i-1][j-1]) ^ int(triangle[i-1][j]))
          new_row += "0"
          triangle.append(new_row)
      for row in triangle:
          print(row)