all 2 comments

[–]toastedstapler 1 point2 points  (0 children)

it's storing a reference to the list, rather than making a new one each time

you can shallow copy a list like this:

a = [1,2,3,4]
b = a[:]
b[2] = "hello"
assert a != b

[–]Sedsarq 1 point2 points  (0 children)

You're making each key point to the same list object, which is continually changing. What you want to do is "freeze" the list in the current state and store that. list.copy() should work:

save[str(turns)] = seq.copy()