I'm trying to store a bunch of lambda expression of the form:
for i in xrange(5):
for j in xrange(i, 5):
diff = abs(j - i)
lambda a, b: abs(a, b) != diff
inside a loop. In every iteration of the loop, the value of diff changes. When it changes, the lambda expression changes as well. I want to keep the formula at it is. I have tried the following:
lambda a, b: abs(a,b) != copy.deepcopy(diff)
but it is not working.
Any idea of how can I achieve this?