adplus-dvertising
frame-decoration

Question

If a={5,6,7}, what happens when a.add(5) is executed?

a.

a={5,5,6,7}

b.

a={5,6,7}

c.

Error as there is no add function for set data type

d.

Error as 5 already exists in the set

Posted under Python

Answer: (b).a={5,6,7}

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. If a={5,6,7}, what happens when a.add(5) is executed?