adplus-dvertising
frame-decoration

Question

What is the output of the following piece of code?
>>> a={5,6,7,8}
>>> b={7,8,9,10}
>>> len(a+b)

a.

8

b.

Error, unsupported operand ‘+’ for sets

c.

6

d.

Nothing is displayed

Posted under Python

Answer: (b).Error, unsupported operand ‘+’ 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 piece of code?