adplus-dvertising
frame-decoration

Question

What is the output of the following piece of code?
>>> a={3,4,5}
>>> a.update([1,2,3])
>>> a

a.

Error, no method called update for set data type

b.

{1, 2, 3, 4, 5}

c.

Error, list can’t be added to set

d.

Error, duplicate item present in list

Posted under Python

Answer: (b).{1, 2, 3, 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 piece of code?