Python never implicitly copies objects. When you set dict2 = dict1, you are making them refer to the same exact dict object, so when you mutate it, all references to it keep referring to the object in its current state.

If you want to copy the dict (which is rare), you have to do so explicitly with

dict2 = dict(dict1)

or

dict2 = dict1.copy()

Note: If the values of your dict are mutable (list, dict, etc...). This solution may not work as expected because it is doing a shallow copy.

Answer from Mike Graham on Stack Overflow
🌐
W3Schools
w3schools.com › python › python_dictionaries_copy.asp
Python - Copy Dictionaries
Python Study Plan Python Interview Q&A Python Bootcamp Python Training ... You cannot copy a dictionary simply by typing dict2 = dict1, because: dict2 will only be a reference to dict1, and changes made in dict1 will automatically also ...
Discussions

Duplicate a dictionary: dict2 = dict1.copy() vs dict2 = dict1
https://stackoverflow.com/questions/3975376/why-updating-shallow-copy-dictionary-doesnt-update-original-dictionary https://stackoverflow.com/questions/2465921/how-to-copy-a-dictionary-and-only-edit-the-copy#comment2458006_2465932 More on reddit.com
🌐 r/learnpython
19
2
July 24, 2023
Copy dictionary and modify it without affecting the original
Good morning. I have copied a dictionary and would like to modify the copy without affecting the original. That’s easy when the dictionary elements are integers or strings, but if there are nested dictionaries, when I modify the copied dictionary, the original is modified. More on forum.inductiveautomation.com
🌐 forum.inductiveautomation.com
18
0
July 26, 2022
How do I make a copy of dict items without <built-in method copy of dict object at 0x1038eddc8>
min_power_dict[x].copy is a reference to the copy method of the class dict. You want the result of calling that method, so you need to add parentheses to call it: min_power_dict[x].copy(). More on reddit.com
🌐 r/learnpython
2
2
January 27, 2018
Why doesn't dict.items() and dict.keys() return a list?

What is the benefit of these objects?

A list has to load all its data into memory before doing anything. These objects just reference the underlying dict, not duplicating anything. This means that they are less memory-hungry and that, if you are apt to exit the loop quickly, you didn't pay to copy everything beforehand.

To me they just seem to introduce unnecessary complexity to my code.

It is one more thing to keep in mind, and I share your skepticism about its value. Ultimately, few will share it.

FWIW, numpy.array does more guessing than your average nice function, and this leads to a lot of stuff like this. I'm not sure that there is a nice API it could provide that didn't have such hiccups sometimes, though.

More on reddit.com
🌐 r/Python
83
76
March 29, 2016
🌐
Delft Stack
delftstack.com › home › howto › python › python copy dictionary
How to Copy a Dictionary in Python | Delft Stack
February 2, 2024 - If we want to copy a dictionary and avoid referencing the original values, then we should find a way to instantiate a new object in the memory. In Python, there are a few functions that support this approach: dict(), copy(), and deepcopy().
🌐
LabEx
labex.io › tutorials › python-how-to-create-deep-copy-of-dictionaries-419728
How to create deep copy of dictionaries | LabEx
Deep copying creates a completely independent copy of a dictionary, including all nested objects. Python's copy module provides the most reliable method for deep copying.
🌐
Reddit
reddit.com › r/learnpython › duplicate a dictionary: dict2 = dict1.copy() vs dict2 = dict1
r/learnpython on Reddit: Duplicate a dictionary: dict2 = dict1.copy() vs dict2 = dict1
July 24, 2023 -

I read somewhere that

FaveCar = {
'Brand': "Toyota",
'Model': "Celica",
'Year' : 2004
}
print("2004 FaveCar dict: ", FaveCar)
copied_FaveCar = FaveCar.copy() # <-- this creates a simple copy of the dictionary FaveCar like I'd expect
equated_to_FaveCar = FaveCar # <-- this creates a dictionary that changes whenever FaveCar changes
FaveCar = {
'Brand': "Subaru",
'Model': "Crosstrek",
'Year' : 2024
}

print("copied_FaveCar = FaveCar.copy()")
print("equated_to_FaveCar = FaveCar")
print("\n2024 FaveCar update:")

# However, I just tested it. What I said above does NOT seem to be true.

''' ------ output

2004 FaveCar dict: {'Brand': 'Toyota', 'Model': 'Celica', 'Year': 2004}
copied_FaveCar = FaveCar.copy()
equated_to_FaveCar = FaveCar
2024 FaveCar update:
FaveCar now is: {'Brand': 'Subaru', 'Model': 'Crosstrek', 'Year': 2024}
copied_FaveCar = {'Brand': 'Toyota', 'Model': 'Celica', 'Year': 2004}
equated_to_FaveCar = {'Brand': 'Toyota', 'Model': 'Celica', 'Year': 2004}

^-- equated_to_FaveCar did NOT magically change when I updated FaveCar

Was what I read dependent on a certain library being loaded?

I had google'd something like

"Why do I need the .copy() method when I can just equate 2 dictionaries?"

'''

🌐
GeeksforGeeks
geeksforgeeks.org › python-dictionary-copy
Python Dictionary copy() - GeeksforGeeks
July 8, 2022 - Python Dictionary copy() method returns a shallow copy of the dictionary.
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › copy the dictionary and edit it in python
Copy the Dictionary and edit it in Python - Spark By {Examples}
May 31, 2024 - How to deep copy the dictionary and edit it in Python without modifying the original dict? Python does not implicitly copy objects, and if you are not
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-ways-to-copy-dictionary
Python | Ways to Copy Dictionary - GeeksforGeeks
July 11, 2025 - Method#1: Using copy() copy() method returns a shallow copy of the dictionary. It doesn't take any parameter and return a new dictionary which is not referring to the initial dictionary.
🌐
Inductive Automation
forum.inductiveautomation.com › ignition
Copy dictionary and modify it without affecting the original - Ignition - Inductive Automation Forum
July 26, 2022 - Good morning. I have copied a dictionary and would like to modify the copy without affecting the original. That’s easy when the dictionary elements are integers or strings, but if there are nested dictionaries, when I …
🌐
Vultr Docs
docs.vultr.com › python › standard-library › dict › copy
Python dict copy() - Duplicate Dictionary | Vultr Docs
November 6, 2024 - The copy() method in Python is a straightforward way to make a shallow copy of a dictionary. This method is essential when you need to duplicate a dictionary but want to make changes to the new copy without affecting the original dictionary.
🌐
Educative
educative.io › answers › how-to-copy-a-dictionary-in-python
How to copy a dictionary in Python
The built-in dict() function can be used to make a shallow copy of a dictionary. ... This function will take the dictionary to be copied as an argument and return a shallow copy of that dictionary.
🌐
Johannes Haupt
johaupt.github.io › blog › python_copy_dictionary.html
How to Copy a Python Dictionary | Johannes Haupt
April 1, 2021 - a = {'a_1':[1], "a_2":[2]} b = {'b_1':[1], "b_2":[2]} c = {'a':a,'b':b} d = {key:item for key, item in c.items()} # Assign new key d['new'] = d.pop('b') print(f"{d=}") # Assign new value to an element within the dictionary d['a']['a_1'] = 'test' print(f"{d=}") print(f"{c=}") {'a': {'a_1': [1], 'a_2': [2]}, 'new': {'b_1': [1], 'b_2': [2]}} {'a': {'a_1': 'test', 'a_2': [2]}, 'new': {'b_1': [1], 'b_2': [2]}} {'a': {'a_1': 'test', 'a_2': [2]}, 'b': {'b_1': [1], 'b_2': [2]}} [!] This copies the dictionary structure, but does not copy the elements themselves!
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-create-deepcopy-of-dictionary-without-using-copy-module
Create Deepcopy Of Dictionary Without Using Copy Module - Python - GeeksforGeeks
July 23, 2025 - The task of creating a deep copy of a dictionary in Python without using the copy module involves duplicating a dictionary such that changes made to the copied version do not affect the original dictionary.
🌐
datagy
datagy.io › home › python posts › copy a python dictionary: a complete guide
Copy a Python Dictionary: A Complete Guide • datagy
March 12, 2022 - When primitive data types (such as integers and strings) are modified, the reference to the original dictionary are broken. When non-primitive data types are modified, the values are modified in both locations. Let’s see how this looks in action using our sample dictionary above: # Copying a Dictionary using .copy() original = {'a': 1, 'b': 2, 'c': [1, 2, 3]} copied = original.copy() print(copied) # Returns: {'a': 1, 'b': 2, 'c': 3}
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-copy-dictionary
Python Copy Dictionary - GeeksforGeeks
July 23, 2025 - The easiest way to copy a dictionary in Python is by using copy() method. This method creates a shallow copy of the dictionary. It means that the new dictionary will have the same keys and values as the original dictionary but if any of the ...
🌐
AskPython
askpython.com › home › 4 easy ways to copy a dictionary in python
4 Easy Ways to Copy a Dictionary in Python - AskPython
April 6, 2023 - Similar to the case of the element-by-element copying technique, here too, change in non-iterable elements of dict2 does not have any effect on the original dictionary, Whereas for iterable ones like lists, the change is reflected in the given dictionary dict1 too · We can use another Python dictionary copy method deepcopy() to copy a dictionary in Python.
🌐
Python Guides
pythonguides.com › python-dictionary-copy
How To Copy A Dictionary In Python?
August 19, 2025 - Learn six easy ways to copy a dictionary in Python with examples. From copy() to deepcopy(), dict(), loops, and comprehension, explained step by step.
🌐
Reddit
reddit.com › r/learnpython › how do i make a copy of dict items without
r/learnpython on Reddit: How do I make a copy of dict items without <built-in method copy of dict object at 0x1038eddc8>
January 27, 2018 -

I'm trying to build a new dictionary that is mutable from one that I want to remain unchanged to be used later.

Here is my loop, current_minor_power_dict = {} for x in min_power_dict: for y in arch['minor_p_list']: if x == y: current_minor_power_dict[x] = min_power_dict[x].copy

it works like I want BUT, the dictionary prints out as:

{'Damage_Field': <built-in method copy of dict object at 0x1038e8ab0>,

'Explosion': <built-in method copy of dict object at 0x1038e8e58>, 'Flight': <built-in method copy of dict object at 0x1038e8ee8>, 'Force-Field': <built-in method copy of dict object at 0x1038e8f78>, 'Iron_Will': <built-in method copy of dict object at 0x1038ed168>, 'Resistance': <built-in method copy of dict object at 0x1038ed900>, 'Super-Strength': <built-in method copy of dict object at 0x1038eddc8>}

How do I make a clean copy of these dicts in my new dict please?

🌐
SitePoint
sitepoint.com › python hub › copy dictionaries
Python - Copy Dictionaries | SitePoint — SitePoint
To create a deep copy, we need to import Python's copy module and use its deepcopy function: ... The deep copy creates a completely independent copy of the original dictionary, including all nested objects.