R

Ram Sharma • 193.86K Points
Coach

Q. Suppose there are two sets, set1 and set2,where set1 is the superset of set2. It is required to get only the unique elements of both the sets. Which of the following will serve the purpose?

Code:
set1={2,3}

set2={3,2}

set3={2,1}

if(set1==set2):

    print("yes")

else:

    print("no")

if(set1==set3):

    print("yes")

else:

    print("no")
  • (A) set1|set2
  • (B) set1&set2
  • (C) set1-set2
  • (D) None of the above
  • Correct Answer - Option(C)
  • Views: 157
  • Filed under category Python

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics