This class method returns a shallow copy of the dictionary.
dict.copy()
#!/usr/bin/python dict1 = {'Name': 'Zara', 'Age': 7}; dict2 = dict1.copy() print "New Dictinary : %s" % str(dict2)
This produces following result:
New Dictinary : {'Age': 7, 'Name': 'Zara'}
Advertisement