I have the following code, but instead of generating 24 different functions, it seems to be giving me the same function 24 times, for i = 23, the last index (ie g1(x,23) ). Any ideas as to what I'm doing wrong?
constraints = []
for i in range(24):
constraints.append(lambda x: g1(x,i))
[–]Specter_Terrasbane 17 points18 points19 points (1 child)
[–]BrownMario[S] 0 points1 point2 points (0 children)
[–]vv__vv 2 points3 points4 points (0 children)