+ 3
Help me understand why these lists are not doing the same thing.
3 Answers
+ 2
by doing i(1) you assign x argument with 1, as you're accessing lambdas...
so first case return always 2 (last item of range * x), while second return [0*1,1*1,2*2] ;)
+ 1
You can see that lambda as:
def f(x):
global i
return i*x
- 1
Hi