The problem is that I expect the following three lists to be the same when called, but l2 and l3 are equal to each other, l1 is different
l1 = [(lambda: j) for j in range(2)]
l2= [lambda:0, lambda: 1]
l3 = [(lambda: j)() for j in range(2)]
print(l1)
print(l2)
print(l1[0]())
print(l2[0]())
print("l3: ", l3)
Also, when I print out l1 and l2 (not called), I get the exact same list of lambda object, but they are different when called. What is happening?