Python Programming - Lambda Functions - Discussion

Discussion Forum : Lambda Functions - General Questions (Q.No. 7)
7.
What is the main difference between map() and filter() functions when used with lambda functions?
map() applies the lambda function to each element, filter() creates a filter based on a condition
map() creates a filter, filter() applies the lambda function to each element
Both functions create filters based on conditions
Both functions apply the lambda function to each element
Answer: Option
Explanation:
map() applies the lambda function to each element of an iterable, while filter() creates a filter object based on a condition specified 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.