Python Programming - Lambda Functions - Discussion

Discussion Forum : Lambda Functions - General Questions (Q.No. 54)
54.
What is the purpose of the functools.lru_cache() function when used with a lambda function?
To create a memoized version of the lambda function.
To create a filter object based on the lambda function's condition.
To sort the elements of an iterable using the lambda function.
To apply the lambda function to each element of an iterable.
Answer: Option
Explanation:
functools.lru_cache() is used to create a memoized version of a function, including lambda functions, for efficient caching of results.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.