Python Programming - Lambda Functions - Discussion

Discussion Forum : Lambda Functions - General Questions (Q.No. 28)
28.
What does the following lambda function do?
lambda x, y: x if x > y else y
Squares the input.
Returns the sum of x and y.
Returns the larger of the two values.
Multiplies x and y.
Answer: Option
Explanation:
The lambda function returns the larger value between x and y using a conditional expression.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.