4 lines
95 B
Python
4 lines
95 B
Python
funcs = []
|
|
for i in range(10):
|
|
funcs.append(lambda i=i: i * i)
|
|
print funcs[3]() # prints 9
|