I'm new to python. I tried doing this

>>> x = [[]] * 3
>>> print x
[ [] [] [] ]
>>> x[0].append( 2 )
[ [2] [2] [2] ]

I confused with the last line output. I actually expected something
like

[ [2] [] [] ]

Can anyone give me an explanation. help!!

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to