Python Programming - Lambda Functions - Discussion
Discussion Forum : Lambda Functions - General Questions (Q.No. 63)
63.
What is the result of the following code?
items = ['apple', 'banana', 'cherry']
lengths = list(map(lambda x: len(x), items))
print(lengths)
Answer: Option
Explanation:
The
map()
function applies the lambda function to get the length of each string in the list.
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