merging really huge lists fast

Moshe Zadka moshez at math.huji.ac.il
Sun Feb 13 17:36:16 CET 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