matching strings in a large set of strings

Miki miki.tebeka at gmail.com
Thu Apr 29 19:40:08 CEST 2010


> I have approx 83 million strings, all 14 characters long. I need to be
> able to take another string and find out whether this one is present
> within the 83 million strings.
Have a look at the shelve module.

If you want to write the algorithm yourself, I suggest
http://en.wikipedia.org/wiki/Trie

HTH,
--
Miki
http://pythonwise.blogspot.com



More information about the Python-list mailing list