Python Programming - Lambda Functions - Discussion

Discussion Forum : Lambda Functions - General Questions (Q.No. 16)
16.
In Python, what does the following code represent?
lambda x: x ** 2
A lambda function squaring its input
A lambda function with two parameters
A lambda function taking the square root of its input
A lambda function doubling its input
Answer: Option
Explanation:
The lambda function lambda x: x ** 2 represents a function that squares its input (multiplies it by itself).
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.