Post

Python Programming
Python Programming@PythonPr·
Python Question / Quiz; What is the output of the following Python code, and why? Comment your answers below!
Python Programming tweet media
English
21
13
126
13.2K
Himanshu Kumar
Himanshu Kumar@codewithimanshu·
@PythonPr Good question, Python! Let's see who gets the correct output and explains the logic, right?
English
0
0
1
410
Purple Nurple
Purple Nurple@purplezone·
@PythonPr D. Prints elements unique in s1 & s2 but not in both.
English
0
0
8
644
Satheesh Paskanti
Satheesh Paskanti@SatheeshPaskan1·
@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
0
0
4
431
Abhishek Dubey
Abhishek Dubey@On_Akdy·
@PythonPr The answer is D because ^ operator performs the symmetric difference between 2 sets.
English
0
0
1
38
LucasH Sketch
LucasH Sketch@dibujoslucas·
@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
0
0
1
254
wheelsonX🚩
wheelsonX🚩@bikeronx·
@PythonPr D- symmetric difference so it returns different elements
English
0
0
1
285
DailyCodeflow
DailyCodeflow@DailyCodeflow·
@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
0
0
0
0
แชร์