Rookie question about data types (hashtables)

Rainer Deyke rainerd at eldwood.com
Thu Jan 29 00:04:09 EST 2004


Steve D. Perkins wrote:
>     What I would LIKE to have is a hashtable-like structure that lets
> me retrieve multiple values based on a partial key.

Sounds like a sorted list would work best.  A binary search (see the bisect
module) lets find all matches in O(log n) time.


-- 
Rainer Deyke - rainerd at eldwood.com - http://eldwood.com





More information about the Python-list mailing list