I have the following code:
funcs = [] for i in range(10): def func(): print i funcs.append(func) for f in funcs: f()
The pro
You could try
for i in range(10): def func(j=i): print j funcs.append(func) for f in funcs: f()