What is lambda operator and how it can be used in python 3? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is lambda operator and how it can be used in python 3?

16th Apr 2017, 6:10 PM
Vignesh
Vignesh - avatar
3 Answers
+ 6
@Mayur That's actually a Brazilian dance, I think ;) 🇧🇷💃 But you are right - lambdas are used as kind of "on the go" functions. They are excellent in list comprehensions, if you want to quickly generate, filter or sort a list which has some regularity. Take a look here and think of how long a code I would have to write to sort those IP numbers if it weren't for lambdas :) https://code.sololearn.com/cJqu6Q00Gidt/?ref=app
16th Apr 2017, 6:25 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 3
lambada is used for anonymous function. that is the function which have no name but used as function.
16th Apr 2017, 6:16 PM
Mayur Chaudhari
Mayur Chaudhari - avatar
+ 2
lambda is used in functional programming to create anonymous function by variable binding and subtitution
16th Apr 2017, 7:55 PM
⏩▶Clau◀⏪
⏩▶Clau◀⏪ - avatar