On May 10, 1:26 pm, Gigs_ <[EMAIL PROTECTED]> wrote:
> Hi all!
>
> I have text file (english-croatian dictionary) with words in it in 
> alphabetical
> order.
> This file contains 179999 words in this format:
> english word: croatian word

Let's assume it's okay to have all the data in memory.
In my experience the very fastest way to do what you
want is to store the strings in a sorted list and use
the binary search library module bisect.  I once compared this
with doing something similar with tries and it was
much faster.  It's also the most simple way to do it, which
is nice too :).
  -- Aaron Watters

===
never eat anything bigger than your head -- kliban


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to