title: What's faster in this case: searching a list or dict?
body: <p>Say I have a text, 50,000 words, and I want to check every word in the text to see if it's been encountered yet. Would it be faster to:</p>
  
  <pre><code>a)  double_checker = []
      for word in text:
          if word not in double_checker:
              double_checker.append(word)
              [perform operations]
  
  b)  double_checker = {'a':[], 'b':[], 'c':[], 'd':[], 'e':[], 'f':[], 
                        'g':[], 'h':[], 'i':[], 'j':[], 'k':[], 'l':[], 
                        'm':[], 'n':[], 'o':[], 'p':[], 'q':[], 'r':[],
                        's':[], 't':[], 'u':[], 'v':[], 'w':[], 'x':[],
                        'y':[], 'z':[]}
      for word in text:
          if word not in double_checker[word[0].lower()]:
              double_checker[word[0].lower()].append(word)
              [perform operations]
  </code></pre>
  
  <p>I'll be testing this myself, but my code takes about an hour to run so I was wondering if there were a theoretical calculation. I know the list is O(N) and a dict works off a faster hash, but the dict method has to also search through lists roughly 1/26th the size (obviously there will be more 'e' entries than 'z') AND access the 0th element of every word twice. For what I'm doing it isn't feasible to pre-sort.</p>
  
  <p>Any thoughts are appreciated.</p>