# Python Lambda

The Function without a name is the Anonymous function and we also called a Lambda function.
A Lambda function uses one expression to take any number of the argument.

#### Syntax:

lambda arguments: expression

#### Example:

Add 5 to the arguments a, And then return the value and print it.

f = lambda a : a + 5
print(f(5))

10

## Example of a Lambda with multiple arguments.

#### Example:

x = lambda ab : a * b
print(x(156))

90

#### Example:

x = lambda abc : a + b + c
print(x(1569))

30

## Why Use Lambda Function? What are the features of the lambda function?

Lambda function is used for nameless function, so we have to use it when we required a function with a short period of time and nameless function.
And lambda contains multiple arguments in one expression.

### Make a function that doubles the number we send:

#### Example:

def myfunc(n):
return lambda a : a * n

mydoubler = myfunc(2)

print(mydoubler(11))

22

#### Example:

def myfunc(n):
return lambda a : a * n

mydoubler = myfunc(2)
mytripler = myfunc(3)

print(mydoubler(8))
print(mytripler(8))

16
24