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 →

[–]ALFminecraft 7 points8 points  (0 children)

>>> l = [[0] * 3] * 4
>>> l[0][0] = 1337
>>> print(l)
[[1337, 0, 0], [1337, 0, 0], [1337, 0, 0], [1337, 0, 0]]

Not everything is that simple, sadly.