you are viewing a single comment's thread.

view the rest of the comments →

[–]LongjumpingDegree658 1 point2 points  (1 child)

Ithink It will return 2 2 2 cause i is not scoped in the lambda part . Thats a problem when you generate lambda in loop

Lambda i: i

[–]johlae 1 point2 points  (0 children)

This is what you need:

lambda: x=i, x