Suppose a and b are lists.
What is more efficient in order to extend the list a by appending all
the items in the list b ?
I imagine a.extend(b)to be more efficient for only appendinding the
items from b while a+=b creates a copy of a before appending, right ?
--
* candide:
Suppose a and b are lists.
What is more efficient in order to extend the list a by appending all
the items in the list b ?
I imagine a.extend(b)to be more efficient for only appendinding the
items from b while a+=b creates a copy of a before appending, right ?
No.
But in
candide, 22.04.2010 09:10:
Suppose a and b are lists.
What is more efficient in order to extend the list a by appending all
the items in the list b ?
I imagine a.extend(b)to be more efficient for only appendinding the
items from b while a+=b creates a copy of a before appending, right ?
candide wrote:
Suppose a and b are lists.
What is more efficient in order to extend the list a by appending all
the items in the list b ?
I imagine a.extend(b)to be more efficient for only appendinding the
items from b while a+=b creates a copy of a before appending, right ?
No. Both
Alf P. Steinbach a écrit :
* candide:
Suppose a and b are lists.
What is more efficient in order to extend the list a by appending all
the items in the list b ?
I imagine a.extend(b)to be more efficient for only appendinding the
items from b while a+=b creates a copy of a before
On Thu, 22 Apr 2010 09:31:12 +0200, candide wrote:
Alf P. Steinbach a écrit :
* candide:
Suppose a and b are lists.
What is more efficient in order to extend the list a by appending all
the items in the list b ?
I imagine a.extend(b)to be more efficient for only appendinding the
items
On Apr 22, 12:10 am, candide cand...@free.invalid wrote:
Suppose a and b are lists.
What is more efficient in order to extend the list a by appending all
the items in the list b ?
I imagine a.extend(b)to be more efficient for only appendinding the
items from b while a+=b creates a copy of a