Python Programming - Lambda Functions - Discussion

Discussion Forum : Lambda Functions - General Questions (Q.No. 36)
36.
What is the purpose of the functools.reduce() function when used with a lambda function?
To apply the lambda function to each element of an iterable.
To create a filter object based on the lambda function's condition.
To accumulate values from an iterable using the lambda function.
To sort the elements of an iterable using the lambda function.
Answer: Option
Explanation:
functools.reduce() successively applies the lambda function to accumulate values in an iterable.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.