This does not work because you are creating an array with two references to the same array.
Alternative approach:
[[0]*2 for i in range(2)]
Or more explicit:
[[0 for j in range(2)] for i in range(2)]
This works because it creates a new array at each iteration.
, ?
, , , . , [Foo()] * 2 [Foo() for i in range(2)]. , . .