複製字典

字典物件的方法為 copy。它執行字典的淺表副本。

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