make a deep copy, copying the values, any values they contain : Copy : Buildin Module PYTHON TUTORIALS


PYTHON TUTORIALS » Buildin Module » Copy »

 

make a deep copy, copying the values, any values they contain


from copy import deepcopy

d = d['names'] ['Alfred', 'Bertrand']}
c = d.copy()
dc = deepcopy(d)
d['names'].append('Clive')
print d
print dc



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Buildin Module
» Copy