Posts

Showing posts from March, 2020

What is Lambda Function and it's application

Image
                                       Lambda Function  Introduction A lambda function is a small function containing a single expression.  Lambda functions can also act as anonymous functions where they don’t require any name. These are very helpful when we have to perform small tasks with less code. We can also use lambda functions when we have to pass a small function to another function. Don’t worry – we’ll cover this in detail soon when we see how to use lambda functions in Python. Lambda functions are handy and used in many programming languages but we’ll be focusing on using them in Python here.  In Python, lambda functions have the following syntax: Lambda functions consist of three parts: Keyword Bound variable/argument, and Body or expression Comparing Lambda with regular function lambda x: x+1   v/s    ...