input: def sierpinski_triangle(n: int) -> None:
      """ Generate the first n elements of the Sierpinski triangle by printing the binary pattern.
      Each line of the triangle is represented by a sequence of '1's and '0's corresponding to the 
      Sierpinski triangle's structure. The function prints out each row directly.
      Example:
      >>> sierpinski_triangle(3)
         1 
        1 0 
       1 1 1 
      >>> sierpinski_triangle(4)
          1 
         1 0 
        1 0 1 
       1 1 1 1 
      """
output:     current_row = [1]
      for i in range(n):
          print(' ' * (n - i - 1), end='')
          print(' '.join(map(str, current_row)))
          next_row = []
          for j in range(len(current_row) - 1):
              next_row.append(current_row[j] ^ current_row[j + 1])
          current_row = [1] + next_row + [1]