Changing one dict changes all dicts in a list of dicts [duplicate]

You need to use .copy() onto your list, else it would be a link of your dict and not a new dict with the same values.
Note that you need to use .copy() on EVERY dict and list you want to copy, even those in your dict/list

Leave a Comment