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