Post

@PythonPr Good question, Python! Let's see who gets the correct output and explains the logic, right?
English

@PythonPr D.
Prints elements unique in s1 & s2 but not in both.
English

@PythonPr D
It returns the elements that are in either set, but not in both.
English

@PythonPr D
The ^ operator between 2 sets in python gives the symmetric difference, which includes all elements ane in teither of the sets, but not in both. So the answer is D
English

@PythonPr The answer is D because ^ operator performs the symmetric difference between 2 sets.
English

@PythonPr Obvio que es la D. El operador ^ con sets no tiene misterio, solo la diferencia simétrica. ¿Quién sigue pensando que esto lanza un TypeError en 2024?
Español

@PythonPr D- symmetric difference so it returns different elements
English

@PythonPr D) {2, 5, 6, 7, 9} ✅ In Python, ^ on sets means *symmetric difference* — all elements that appear in exactly one of the sets, not in both.
English










