Python Dictionary copy() Method
❮ Dictionary Methods
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
Parameter Values
No parameters
❮ Dictionary Methods