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
More Related Contents:
- How to return dictionary keys as a list in Python?
- One liner: creating a dictionary from list with indices as keys
- How do I return dictionary keys as a list in Python?
- Appending to list in Python dictionary [duplicate]
- Python – How to convert only numbers in a mixed list into float?
- How to convert only numbers in a mixed list into float
- how to unpack a tuple in this form (‘abc’, [20, 20])? [closed]
- Why can’t I use a list as a dict key in python?
- What do ellipsis […] mean in a list?
- How can I get list of values from dict?
- Are lists thread-safe?
- Getting a list of values from a list of dicts
- Creating a list of dictionaries results in a list of copies of the same dictionary
- How can I make a dictionary from separate lists of keys and values?
- How to convert list of key-value tuples into dictionary?
- How can I generate a list of consecutive numbers?
- join two lists of dictionaries on a single key
- Check if value already exists within list of dictionaries?
- Convert list into a dictionary [duplicate]
- Combining Dictionaries Of Lists In Python
- Most Pythonic Way to Build Dictionary From Single List
- Python: get a dict from a list based on something inside the dict
- Best way to check if an item is present in a list of lists? [duplicate]
- How to get count dict of items but maintain the order in which they appear?
- Mapping dictionary value to list
- How to change all the dictionary keys in a for loop with d.items()?
- How does str.startswith really work?
- How to sort a list of dictionaries by a value of the dictionary in Python?
- Converting string to tuple without splitting characters
- How to create a nested dictionary from a list in Python?