My code is not working
<pre><code>for i in l1:
    print "the i is ", i
    print i[0]   # 'a'
    print i[1]   # (1, 1)
    n = re.search(r'[a-z]', i[0])
    v = (1,1)
    if i[0] != n:
    v = (1,1)
    n = i[0]
    if i[1] != v:
        raise ValueError, '[%s, %s] is missing in %s' %(i[0], (i[1][0], i[1][1]-1), production)

    v = (v[0], v[1] + 1)
</code></pre>

<p>I need to check whether any item is missing in the given list
l1 = [['a', (1, 2)], ['a', (1, 3)], ['a', (1, 4)]]<code>in this case</code>['a', (1, 1)]` is missing so I should report an error.</p>

<p>similarly if we have the lists l1 = ['b', (1,1)] ,['b', (1, 3)], ['a', (1, 4)]]<code>. In this case</code>['b', (1, 2)]` is missing so the error should be reported as shown in the code below.</p>

<p>I am always getting ['a', (1,1)] in spite of if it is present in the list
l1 = [['a', (1, 1)],['a', (1, 2)], ['a', (1, 3)], ['a', (1, 4)]]</p>
