Skip to main content

reduce Function in Python

 






from functools import reduce



l = [1,2,3,4,5]
p = reduce(lambda x,y:x+y,l )
print(p)


Comments