Python – Lambda Function

Lambda Function in Python

Lambda function is a small anonymous function. These functions are called anonymous because they are not declared in the standard manner by using the def keyword. A lambda function can take any number of arguments, but can only have one expression.


lambda arguments expression
Python Lambda Function Tutorial

In Lambda Function the expressions are executed and result is returned.

Single Argument Lambda Function:

x = lambda a : a +10

Multiple Argument Lambda Function:

x = lambda a, b : a * b
y = x(5,6) # y stores return value
Filed under: Python

No comment yet, add your voice below!

Leave a Reply