# Revision history [back]

Replace

alfc[iteration]=alf.copy()


with

alfc[iteration] = deepcopy(alf)


(This should work if you're using it in an interactive Sage session, but deepcopy may not be defined in a non interactive session, so you might need to also include from copy import deepcopy.)

See https://stackoverflow.com/questions/2541865/copying-nested-lists-in-python, for example.