I am trying this code for finding the missing member in a list..but it doesn't work
<pre><code>list = [['a', (1,1)], ['a', (1,2)], ['a', (1,4)], ['a', (1,5)]]

for i in list:
    print "the i is ", i
    print i[0]   # 'a'
    print i[1]   # (1, 1)
    n = 'a'
    v = (1,1)
    #n = re.search(r'[a-z]', i[0])
    #v = (v[0], (v[1] + 1))
    print "just", i[1]
    print "trying ", v
    for j in i:  
        if (j[0] != n):
            v = (1, 1)
            n = i[0]
        if (i[1] != v):
            print v
            raise ValueError, '[%s, %s] is missing' %(i[0], (i[1][0], i[1][1]-1))

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

<p>The value doesn't seem to change after the first iteration i.e. it remains to <code>(1,1)</code>, which I can see however what needs to be done so that it reports the missing item in a list i.e. in this example list it is <code>['a', (1, 3)]</code>. Generally, the code starts with <code>['a', (1,1)]</code> for detection of its missing in a list and so it follows each item in a sequence</p>
