In playing with lists of lists, I found the following:

(In 3.1, but the same happens also in 2.7)

list = [1,2,3]
list.append ( [4,5,6] )
x = list
x   ->
    [1,2,3,[4,5,6]]
as expected.

But the shortcut fails:

list=[1,2,3]
x = list.append( [4,5,6] )
x   ->
   nothing

Can someone explain this to me?

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

Reply via email to