Saturday, November 2, 2019

Lambda Functions

Lambda Functions


In Python, an anonymous function is a function without a name. Lambda function is an anonymous function. 
The syntax for Lambda Function-
                lambda arguments: expression

Lambda functions can have any number of arguments but only one expression. The expression is evaluated and returned. Lambda function can never be used whenever objects are required.

Example:











No comments:

Post a Comment