Python Programming - Lambda Functions - Discussion

Discussion Forum : Lambda Functions - General Questions (Q.No. 12)
12.
What happens if a lambda function is used as an argument for the key parameter in the max() function?
It raises a SyntaxError
It serves as the comparison function for finding the maximum value
It must be enclosed in square brackets
It only works if the lambda function has a single parameter
Answer: Option
Explanation:
When a lambda function is used as the key parameter in max(), it defines the sorting criteria for finding the maximum value.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.