2 Python Lambda Function Map, Filter and Reduce Examples 1 | RegularPython | Regular Python

Опубликовано: 18 Октябрь 2024
на канале: RegularPython
96
0

#PythonLambdaFunction #Map, #Filter and #Reduce Examples 1 | #RegularPython | #Regular #Python

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/