What is the best way to merge two lists?

Padraig Brady Padraig at Linux.ie
Mon Nov 18 05:40:52 EST 2002


Pierre Rouleau wrote:
> What's the most efficient way to merge two lists inside a single one 
> with the resulting list having only one instance of each element (ie not 
> having two elements with the same value)?
> 
> The order of the elements is not a criteria for the selection of the 
> algorithm.

This is relevant I think:
http://www.python.org/peps/pep-0218.html

Pádraig.




More information about the Python-list mailing list