efficient matching of elements a list

Rene Pijlman reply.in.the.newsgroup at my.address.is.invalid
Sat Jan 24 12:19:10 CET 2004

>Suppose I have a lists of tuples
>What is the fastest way in python to get out all the tuples from the 
>list whose first element is equal to i?

A list is not an efficient data structure for this query. Why don't you
design another data structure?

René Pijlman

More information about the Python-list mailing list