Searching a List of Lists - Python
<p>Basically I have converted a tab delimited txt file into a list containing a bunch of lists for each book (title, author, publisher, etc) and I have figured out how to search for something using indexes, but how can I make it so it searches and returns anything that matches even partially.</p>

<pre><code>import csv
import itertools

list_of_books = list(csv.reader(open('bestsellers.txt','rb'), delimiter='\t'))

search = 'Tom Clancy'
for sublist in list_of_books:
    if sublist[1] == search:
        print sublist
</code></pre>

<p>EG. So instead of having to search 'Tom Clancy' someone could enter 'clancy' and still get all the Tom Clancy novels.</p>

<p>Thanks.</p>
