efficient matching of elements a list

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


omission9:
>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