Reduce: lambda function inside : reduce « Buildin Function « Python






Reduce: lambda function inside

Reduce: lambda function inside


foo = [2, 18, 9, 22, 17, 24, 8, 12, 27]
 
print reduce(lambda x, y: x + y, foo)



           
       








Related examples in the same category

1.Reduce function with addReduce function with add
2.Functional Programming Tools: reduceFunctional Programming Tools: reduce
3.Functional Programming Tools: reduce 2Functional Programming Tools: reduce 2