Python Dictionary copy() Method
Example
Copy the car
dictionary:
car = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
x = car.copy()
print(x)
Try it Yourself »
Definition and Usage
The copy()
method returns a copy of the specified
dictionary.
Syntax
dictionary.copy()
Parameter Values
No parameters