Course Content
What is Python?
Introduction of Python and Its setup
0/2
Control Statement
Control statements are used to control the flow of execution depending upon the specified condition/logic.
0/4
File Handling
File handling is an important component of any application. Python has multiple functions for creating, reading, updating, and deleting files.
0/2
Examples
Following are the examples of python scripts to try hands-on, you are ready to start your python journey.
0/7
Python
About Lesson

Lambda Functions

A lambda function is an anonymous function in Python.

In python, normal functions are defined using the def keyword, anonymous functions are defined using the lambda keyword.

In python, a lambda function can take a number of arguments, but can only have one expression.

Syntax of Lambda Function

lambda arguments: expression

The expression is executed and the result is returned.

Example

lambda_add = lambda a, b: a + b
				    
print(add_lambda(20,20))

In the above program, lambda a, b: a + b is the lambda function. Here a, b is the argument and a + b is the expression that gets evaluated and returned.