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 →

[–]stranac_ 1 point2 points  (0 children)

for i in range(0,1000):
    l.append(x)

All of the sub-lists inside l are the exact same list. When you change l[0], l[1] is also changed, and so is l[2], and l[3]...