Python Programming - Lambda Functions - Discussion

Discussion Forum : Lambda Functions - General Questions (Q.No. 9)
9.
In Python, can a lambda function have more than one line of code?
Yes, as long as each line is indented
No, lambda functions are limited to a single line
Yes, but only if the lines are separated by commas
No, lambda functions can only contain a single expression
Answer: Option
Explanation:
Lambda functions in Python are restricted to a single expression and cannot span multiple lines of code.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.