In Python, [x]*n creates a new list with n references to x. This is perfectly good to have if x is immutable (string, tuple, etc.), but it gets rather confusing if x is mutable since changes to one element affect x, and thus appear to affect all elements of the list.

So, the solution is to use a list comprehension to create n new things: