Python's idiom for doing this is newList = oldList[:]
↧
Answer by erisco for List changes unexpectedly after assignment. How do I clone or copy it to prevent this?
↧
Python's idiom for doing this is newList = oldList[:]