"James Stroud" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | jairodsl wrote: | > Excuse me, i was trying in too many ways but i couldnt access subindex | > on a list , the problem is the next: | > | > I have | > | > indif=[[0,'A'],[1,'B'],[2,'C'],[3,'D']] | > | > and | > | > indic=[[0,'B'],[1,'C'],[2,'D'],[3,'E']] | > | > i need to eval if indic[i][j] is equal to indif[i][j] | > | > I used a double for but i had got "list index out of range". How can i | > do ??? | > | > Thanks a lot, | > | > Cordially, | > | > jDSL | > | | py> i = 1 | py> j = 0 | py> indif[i][j] == indic[i][j] | True
Or, if you mean for every i and j, just indif == indic and let the types equality method do the work for you. -- http://mail.python.org/mailman/listinfo/python-list