What is the syntax to copy a dictionary?

<dictionary name>.copy();
#examples
passwords = {'John':1123421,'Shirley':'socks', 'Galen':4234.123}
duplicate = passwords.copy()
print(duplicate)

#output
{'John': 1123421, 'Shirley': 'socks', 'Galen': 4234.123}
Advertisements