title: Fastest way to search a list in python
body: <p>When you do something like <code>"test" in a</code> where <code>a</code> is a list does python do a sequential search on the list or does it create a hash table representation to optimize the lookup? In the application I need this for I'll be doing a lot of lookups on the list so would it be best to do something like <code>b = set(a)</code> and then <code>"test" in b</code>? Also note that the list of values I'll have won't have duplicate data and I don't actually care about the order it's in; I just need to be able to check for the existence of a value.</p>