On May 26, 12:46 am, Uncle Ben <bgr...@nycap.rr.com> wrote:
> 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

Thank you all.  It is wonderful to have this community as a resource.

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

Reply via email to