I wrote this simple Python code
PP = [[0, 1], [1, 0]]
F0 = lambda x,y: x
FF = [
lambda u: F0(*(u[i] for i in p)) for p in PP
]
print(FF[0]([1, 2]))
print(FF[1]([1, 2]))
And I got
2
2
While I expected
1
2
With some other tests with more permutations I could observe that FF is indeed a list of the right length but contains only copies of the last function we want. Someone could explain me why ??