I was recently programming and I came across the lambda function. It seemed pretty interesting, but all the responses to how to use it and what it is were really confusing. Can someone put a simple explanation of when to use it? Thanks
Asked
Active
Viewed 201 times
1 Answers
1
In Python, anonymous function is a function that is defined without a name.
While normal functions are defined using the def keyword, in Python anonymous functions are defined using the lambda keyword.
Hence, anonymous functions are also called lambda functions.
EDIT: lambda functions should be anonymous, but they don't have to be anonymous, you can assign them.
EDIT2: The lambda operator or lambda function is a way to create small anonymous functions, i.e. functions without a name

Pablo Escobar
- 23
- 4

mateys
- 26
- 4
-
Stack Overflow Search… 1 Home PUBLIC Stack Overflow Tags Users Jobs Teams+Slack Q&A for work Learn More How to use lambda function in python [duplicate] Ask Question up vote -2 – mateys Nov 30 '18 at 09:34
-
I am no understand your comment sir – Pablo Escobar Nov 30 '18 at 09:35