Let your lambda function break. This is a function that takes two arguments (x, i) and executes x in terms of power i.
The for loop CREATES a new lambda function at each iteration. If you delete i=i, all functions will be the same:lambda x, i: x**i
Thus, there is no value for the for loop. They are all the same.
i=i i for .
[lambda x, i=1: x**i, lambda x, i=2: x**o, lambda ..]
- i.
, , , for, i. , lambda ( i), for . @Arndt , lambda x, y=i: x**y, .