Source

wd_pys60 / wd_lambda_problem.py

1
2
3
4
5
6
funcs=[]
def p(i):
    print i
for i in range(6):
    funcs.append(lambda i=i :p(i))
print funcs[2]()