Python Programming - Lambda Functions - Discussion

Discussion Forum : Lambda Functions - General Questions (Q.No. 11)
11.
In Python, what is the purpose of the sorted() function when used with a lambda function?
To apply the lambda function to each element of an iterable
To create a sorted list based on the lambda function's values
To filter elements from an iterable based on the lambda function's condition
To map the lambda function to each element of an iterable
Answer: Option
Explanation:
The sorted() function is used to create a sorted list from the elements of an iterable, with the sorting criteria defined by the lambda function.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.