adplus-dvertising
frame-decoration

Question

What is the output of the following code?
>>> s={5,6}
>>> s*3

a.

Error as unsupported operand type for set data type

b.

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

c.

{5,6}

d.

Error as multiplication creates duplicate elements which isn’t allowed

Posted under Tuples and Sets Python

Answer: (a).Error as unsupported operand type for set data type

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?