adplus-dvertising
frame-decoration

Question

What is the output of the following code?
>>> a={1,2,3}
>>> b=frozenset([3,4,5])
>>> a-b

a.

{1,2}

b.

Error as difference between a set and frozenset can’t be found out

c.

Error as unsupported operand type for set data type

d.

frozenset({1,2})

Posted under Python

Answer: (a).{1,2}

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?