Efficient String Lookup?

Josiah Carlson jcarlson at uci.edu
Sat Oct 16 11:33:30 EDT 2004


> I have a number of strings, containing wildcards (e.g. 'abc#e#' where # 
> is anything), which I want to match with a test string (e.g 'abcdef'). 
> What would be the best way for me to store my strings so lookup is as 
> fast as possible?

Start with a Trie, and virtually merge branches as necessary.

 - Josiah




More information about the Python-list mailing list