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,6,2,8}

b.

{4,5,6,2,8,6}

c.

Error as unsupported operand type for sets

d.

Error as the duplicate item 6 is present in both sets

Posted under Python

Answer: (c).Error as unsupported operand type for sets

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?