+ 2
Okay i understand how this works but why?
Why not just define a function or just make it its own line? I mean you cant reuse the lambda can you? Wouldnt make sense ii you could.
5 Respostas
+ 3
Nvm i see it now that ive continued with the lesson
+ 3
yes you can reuse for example : var = lambda x,x +3
the use it like this : var(2)
it will print 5
+ 2
lambda gives flexibility, as we can modify our code on the fly . IMO we shouldn't use it while building code as u mentioned we can't use it more than once.
+ 2
in this case you are right but with a little creativity you can use it better. Ill write a code and you will see what I mean. just remind me to do it cause im busy now.
+ 1
Thanks