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
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.