复制字典

字典对象的方法为 copy。它执行字典的浅表副本。

>>> d1 = {1:[]}
>>> d2 = d1.copy()
>>> d1 is d2
False
>>> d1[1] is d2[1]
True