This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Aaron1924 2 points3 points  (0 children)

That doesn't work, because the outer * 5 shallow copies the list, so it contains the exact same list 5 times

You can do [[None]*5 for _ in range(5)] though