Strange results when searching if value exists in list
<p>Here's the area of code I'm having problems with. T1 and T3 are both lists of lists:</p>

<pre><code>for num in T1:
    print num
    print T3[0]
    print type(num)
    print type(T3[0])
    if num == T3[0]:
        print 'they are the same!'
    else:
        print 'nope they are not!'
    if T3.index(num):
            print 'number exists in list!'
</code></pre>

<p>Here's the result:</p>

<pre><code>[0, 0]
[0, 0]
&lt;type 'list'&gt;
&lt;type 'list'&gt;
they are the same!
</code></pre>

<p>The values and types are the same but when I don't see 'number exists in list!'   When I tested <code>list_name.index(value)</code> on the command line it works but not here.  What am I doing wrong?</p>
