Lambda Operator/Function
Lambda Operator/Function
Hi Class!
1
Lambda
Operator/Function
2
Lambda Operator/Function
>>> f = lambda x, y : x + y
>>> f(1,1)
2
More about Lambda functions
• Python supports the creation of
anonymous functions (i.e. functions that
are not bound to a name) at runtime, using
a construct called lambda.
• Its well integrated into Python and is often
used in conjunction with typical functional
concepts like filter(), map() and reduce().
More about Lambda functions