adplus-dvertising
frame-decoration

Question

What is the output of the following code?
>>> a={4,5,6}
>>> b={2,8,6}
>>> a-b

a.

{4,5}

b.

{6}

c.

Error as unsupported operand type for set data type

d.

Error as the duplicate item 6 is present in both sets

Posted under Python

Answer: (a).{4,5}

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 following code?