Python Programming - Lambda Functions - Discussion

Discussion Forum : Lambda Functions - General Questions (Q.No. 25)
25.
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:
The functools.reduce() function is used to successively apply the lambda function to the elements of an iterable, accumulating values.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.