Skip to content

siva2495/2-Functions-in-Python-lambda-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

2-Functions-in-Python-lambda-function

Lambda Function Lambda Expression • This function can have any number of arguments but only one expression, which is evaluated and return. • You need to keep in your knowledge that lambada functions are syntactically restricted to single expression. • It is more efficient than function when the function task is small. • Do not use lambada function when task is complex • It works best when you have to call a Function millions of times but the execution task is simple. Filter Function: • The filter() function in Python takes in a function and a list as arguments. To filter out all the sequences, for which the function returns true. Map Function: • The map() function in Python takes in a function and a list as arguments. The function is called with lambda function and a list and a new list is returned which contains all the lambda modified items returned by that function for each item. Reduce Function: • The reduce() function in Python takes in a function and a list as arguments. The function is called with lambda function and a list and a new reduced result is returned. This performs the repetitive operation over the pairs of the list. • The reduce() function will always take two parameters.

About

Lambda Function

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published