+ 1

What is the major advantage of lambdas

29th Dec 2016, 5:59 PM
vinay
5 Antworten
+ 2
Lambda is the "hit it and quit it" version of a function. Its a quick way of writing a 1 time use function, so you dont have to def
30th Dec 2016, 6:51 AM
Jess Wolfe
Jess Wolfe - avatar
+ 1
They are short and reusable with very little boilerplate
29th Dec 2016, 6:28 PM
James Durand
James Durand - avatar
+ 1
lambda is a fancy way of saying a function. Just keep in mind of a function while working with lambda. It is quite easy to use lambda in Python.
29th Dec 2016, 7:23 PM
Ravishankar Chaubey
Ravishankar Chaubey - avatar
0
It saves time with one line codes. It is also reusable instead of copy and pasting it every time. It outputs the result in an easier way as well.
23rd Jan 2017, 6:05 PM
Lucas
Lucas - avatar
0
It serves to organize the code inside a method; one of its subsections can be a lambda. Such case could violate the Single Responsibility Principle, but could be ok if used properly.
2nd Jul 2021, 7:27 AM
Kiwwi#
Kiwwi# - avatar