Python Programming - Lambda Functions - Discussion

Discussion Forum : Lambda Functions - General Questions (Q.No. 45)
45.
What is the output of the following code?
items = [1, 2, 3, 4, 5]
result = list(map(lambda x: x * 3, items))
[1, 2, 3, 4, 5]
[3, 6, 9, 12, 15]
[1, 4, 9, 16, 25]
[1, 2, 3]
Answer: Option
Explanation:
The map() function applies the lambda function to multiply each item by 3.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.