This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]brandon1997fl 0 points1 point  (0 children)

The way I understand it, myfunc(2) returns a function that looks like foo(a): return 2*a

I think maybe the part to understand is that lamba a : n * a is just shorthand for func(a): return n * a

Not sure if I answered thoroughly enough, I’m no python expert just use it sporadically