MCQ Answer

Which of the following functions will return the symmetric difference between two sets, x and y?

Which of the following functions will return the symmetric difference between two sets, x and y?

निम्नलिखित में से कौन सा कार्य दो सेटों, x और y के बीच सिमेट्रिक डिफ्रेंस को रिटर्न करेगा ?
Topic : Sequence data types in python

A. x | y

B. x ^ y

C. x & y

D. x – y




Correct Answer is :

B. x ^ y



Explanation
The function x ^ y returns the symmetric difference between the two sets x and y. This is basically an XOR operation being performed on the two sets.
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad