Re: Please check my understanding...

2008-07-01 Thread Marc 'BlackJack' Rintsch
On Tue, 01 Jul 2008 12:35:01 -0700, Tobiah wrote: > list.append([1,2]) will add the two element list as the next > element of the list. > > list.extend([1,2]) is equivalent to list = list + [1, 2] > and the result is that each element of the added list > becomes it's own new element in the origin

Re: Please check my understanding...

2008-07-01 Thread [EMAIL PROTECTED]
On 1 juil, 21:35, Tobiah <[EMAIL PROTECTED]> wrote: > list.append([1,2]) will add the two element list as the next > element of the list. list.append(obj) will add obj as the last element of list, whatever type(obj) is. > list.extend([1,2]) is equivalent to list = list + [1, 2] Not quite. The se

Re: Please check my understanding...

2008-07-01 Thread Matimus
On Jul 1, 12:35 pm, Tobiah <[EMAIL PROTECTED]> wrote: > list.append([1,2]) will add the two element list as the next > element of the list. > > list.extend([1,2]) is equivalent to list = list + [1, 2] > and the result is that each element of the added list > becomes it's own new element in the orig

Please check my understanding...

2008-07-01 Thread Tobiah
list.append([1,2]) will add the two element list as the next element of the list. list.extend([1,2]) is equivalent to list = list + [1, 2] and the result is that each element of the added list becomes it's own new element in the original list. Is that the only difference? >From the manual: s.ex