Python Programming - Lambda Functions - Discussion
Discussion Forum : Lambda Functions - General Questions (Q.No. 51)
51.
What does the following lambda function accomplish?
lambda x: x.capitalize() if isinstance(x, str) else None
Answer: Option
Explanation:
The lambda function capitalizes the first letter of a string and returns None for non-string values.
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