5 Respuestas
+ 6
yes your impression is correct!
But sometimes we need a function only once (lets say as key for sorting or a filter function).
In this cases it is a shortpath to defining functions.
+ 3
Ig it really depends on the situation!! Sometimes you want a one time use function, instead of creating a real function and naming it , u can just use lamda and be done.... For eg.. if you wanna call a function within a function with a condition then you can use lamda or it is very useful if you want to reduce the total lines of code...
+ 3
Roland yes. One might need map and filter for better understanding of lambdas.
+ 1
Thanks a lot 👍!
I have also understood better with the Map and filter methods on next python lesson 😄
0
Surely the point of any function is that you can reuse it, doesn't lambda functions get away from this. So I am lost on there purpose other than to make code unreadable! Surely it is better to spend time and create reusable functions.