Lambda Function in Python | Anonymous function | Python |Tutorial 14

preview_player
Показать описание
Hey Everyone Today We Are Going to Learn Anonymous Function Also Called Lambda Function
Anonymous means nameless or unnamed. Python's lambda expression syntax allow us to create such functions using following syntax:

lambda param1,param2,... : single_statement_or_expression

The "lambda" expression returns memory reference of "anonymous function" and we will save this memory reference or pass or returns to/from the functions.
What is the application or role of the "lambda" function?
It is used to "pass" a function to another function via parameter or returns a function. Generally, this kind of technique is known as "callback" where the passing function is called by another function based upon the criteria of code execution.
Рекомендации по теме
visit shbcf.ru