+ 1

What are the real life application if lambda in python?

nums = range(2, 100) for i in range(2, 10): nums = filter(lambda y: y == i or y % i, nums) print nums

28th Jun 2018, 6:40 AM
Sunil Chettri
Sunil Chettri - avatar
2 ответов
+ 3
I think your example code is a great case. Lambdas in any language are nice wherever you want to write a function that is very short or that will not be used anywhere else.
28th Jun 2018, 6:55 AM
Tavi Kohn
Tavi Kohn - avatar
0
I have heard that it is in GUI programming also?Is it so
28th Jun 2018, 7:15 AM
Sunil Chettri
Sunil Chettri - avatar