See if any value exists in list by looping : <p>I do not know what I am missing but I've tried 3 different ways to achieve basically the same thing. Looking at the code below, why does only 1 out of the 4 ways work. I want to see if a value (located in a list) exists inside another list. I checked this <a href="https://stackoverflow.com/questions/7571635/fastest-way-to-check-if-a-value-exist-in-a-list">SO question</a> but still not understanding why the code is failing to print <code>True1</code> , <code>True2</code>, and <code>True4</code>.</p>

<pre><code>l1 = ["bravo", "alhpa", "charlie"]

l2 = ["alpha"]


if l1[1] in l2:
    print "True1"  # does not work

if l1[1] == l2[0]:
    print "True2"  # does not work

if "alpha" in l2:
    print "True3"  # works

for outer in l1:
    for inner in l2:
        if outer == inner:
            print "True4"  # does not work
</code></pre>
