adplus-dvertising
frame-decoration

Question

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

a.

Error

b.

Address of m

c.

1

d.

5

Posted under Python

Answer: (d).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 code shown?