星期五, 六月 13, 2008

Python 用 list([...]) 后的 identify

>>> L1 = ['a', 'b', 'c']
>>> L2 = list(L1)
>>> L2 is L1
False
>>> L2[1] is L1[1]
True

L1 不是 L2,不过其元素一样。

没有评论: