merging really huge lists fast

Moshe Zadka moshez at math.huji.ac.il
Sun Feb 13 11:36:16 EST 2000


On Sun, 13 Feb 2000, thomas wrote:

> Hi,
> 
> I got huge lists I want to merge, but the good old new_list = list1 +
> list2 seems to be slow. Any hints?

Try list1.extend(list2) if you want in-place merging.

no-other-good-ideas-ly y'rs, Z.


PS
.extend is a 1.5.2 addition.





More information about the Python-list mailing list