What is the lambda function in Python?
A lambda function is an anonymous function (a function that does not have a name) in Python. To define anonymous functions, we use the ‘lambda’ keyword instead of the ‘def’ keyword, hence the name ‘lambda function’. Lambda functions can have any number of arguments but only one statement.
Example:
l = lambda x,y : x*yOutput:30
print(a(5, 6))
Share and Support
@Python_Codes
>>Click here to continue<<