def buildfunc return lambda def buildfunclist for in range for in rang

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
l = []
def buildfunc(i, j):
return lambda: i + j
def buildfunclist():
for i in range(2):
for j in range(2):
l.append(buildfunc(i, j))
return l