title: python: fast dictionary word lookup with wildcards*
body: <p>Given a text, which is split into a list of words, I want to lookup each of the words in an dictionary of words, which too is read from a text-file and <code>split('\n')</code>.</p>
  
  <p>Rather than checking if each word is contained in the dictionary (which is gruesomely slow) I need to select a list of elements based on wildcards* ('*' is at the end i.e. no permuterm solution required). For instance, the solution should select all dictionary elements starting with 'dep', without traversing the entire dictionary list.</p>
  
  <p>Performance is of the essence in this case. I though of a Btree...but</p>
  
  <ol>
  <li>What would be the best package and data-type for a fast implementation in Python.</li>
  <li>Please provide code examples</li>
  </ol>