adplus-dvertising
frame-decoration

Question

What is the output of the following piece of code?
>>> a={5,6,7}
>>> sum(a,5)

a.

5

b.

23

c.

18

d.

Invalid syntax for sum method, too many arguments

Posted under Python

Answer: (b).23

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?