執行列表的淺表副本

你可以使用切片建立列表的淺表副本。

>>> l1 = [1,2,3]
>>> l2 = l1[:]     # Perform the shallow copy.
>>> l2
[1,2,3]
>>> l1 is l2
False