root[:]=[root,root]

YAN HUA gosefan at gmail.com
Fri Dec 16 21:40:19 EST 2011


Hi,all. Could anybody tell how this code works?
>>> root = [None, None]
>>> root[:] = [root, root]
>>> root
[[...], [...]]
>>> root[0]
[[...], [...]]
>>> root[0][0][1][1][0][0][0][1][1]
[[...], [...]]
>>>

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20111217/3d3fde25/attachment-0001.html>


More information about the Python-list mailing list