3 Python Lambda Function Map, Filter And Reduce Examples 2 | RegularPython | Regular Python

Опубликовано: 19 Декабрь 2024
на канале: RegularPython
81
2

Python Lambda Function Map, Filter And Reduce Examples 2 | RegularPython | Regular Python
For more information visit my website http://www.regularpython.com/
For more information visit my website http://www.regularpython.com/
Lambda function is also called an anonymous function, which means there is no function name.

To create an anonymous function, we don’t need to use def and return keywords. It is a single line function. A lambda function can take any number of parameters, but can only have one expression.

Syntax:

lambda parameters: expression

Example:

def default_value(a,b):

return a+b

For more information visit my website http://www.regularpython.com/