[Tutor] Searching Sorted Lists

DaSmith@technip.com DaSmith at technip.com
Fri Aug 19 15:49:56 CEST 2005

Hi, Can someone tell me if there is a bulit in Binary search function for
python lists ?

I am currently building lists and sorting them with a comparison function.
The only list search function I know is List.Index(X), which is pretty
inefficient I reckon, especially hen the lists are likely to contain 100's
or 100's of members.

Is there a search function that uses a compariosn function / binary chop ?
or will I have to implement my own ?


Daniel Smith.

More information about the Tutor mailing list