A lambda function is a small anonymous function. A lambda function can take any number of arguments, but can only have one expression.
Syntax
lambda <arguments> : <expression>
Example
Multiply argument a
with argument b
and return the result:
x = lambda a, b : a * b
print(x(5, 6))
Back to parent page: Python
Reference