0
فرق تابع lamda با def, و نحوه استفاده lamda
تو اینترنت درباره این سرچ کردم, ولی چیز زیادی متوجه نشدم. سوالم اینه که فرق لامبدا با دف چیه, و چی جوری نوشته می شود.
4 Antworten
+ 1
Usually we use lambda expressions for 'disposable' functions, something that we only want to use once, typically as a parameter of a higher order function such as map, filter, reduce.
If you want to use a function multiple times, it is neater to define it with def keyword.
+ 1
Thanks, helped me.
0
English: I searched into Internet about lambda, but didn't understand. The question is, what's the difference between lambda and def, and how to write a lambda.
0
You can read about its usage in sololearn lessons about functional programming.
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2460/