adplus-dvertising
frame-decoration

Question

What is the output of the code shown below?
s1={1, 2, 3}
s2={3, 4, 5, 6}
s1.difference(s2)
s2.difference(s1)

a.

{1, 2}
{4, 5, 6}

b.

{1, 2}
{1, 2}

c.

{4, 5, 6}
{1, 2}

d.

{4, 5, 6}
{4, 5, 6}

Posted under Python

Answer: (a).{1, 2}
{4, 5, 6}

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the code shown below?