adplus-dvertising
frame-decoration

Question

What is the output of the code shown below?
import functools
l=[1,2,3,4]
print(functools.reduce(lambda x,y:x*y,l))

a.

Error

b.

10

c.

24

d.

No output

Answer: (c).24

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 code shown below?