3 odpowiedzi
+ 8
lambda is used to
-map
-reduce
-filter
an array
or to sort, where the sort key may be expressed by an anonymous function
(eg last letter of a word)
https://code.sololearn.com/c55cGt2GJQcK/?ref=app
+ 6
@james thats it!
The ZEN of Python is very clear here!
+ 1
See this code for example - it's a short and concise onliner instead of a set of conditionals
https://code.sololearn.com/cu7Mqhya2jpS/?ref=app