Python Programming - Lambda Functions - Discussion
Discussion Forum : Lambda Functions - General Questions (Q.No. 24)
24.
How can a lambda function be used to define a key for sorting a list of tuples by the second element?
Answer: Option
Explanation:
The lambda function
lambda x: x[1]
extracts the second element of a tuple, which is suitable for sorting based on the second element.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers