adplus-dvertising
frame-decoration

Question

What is the output of the following code?
>>> a={1,2,3}
>>> b=a.add(4)
>>> b

a.

None

b.

{1,2,3,4}

c.

{1,2,3}

d.

Nothing is printed

Posted under Python

Answer: (d).Nothing is printed

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?