list index question

Matt Singer mrsinger at usa.net
Tue Apr 1 10:06:28 EST 2003


I'm sure this is probably a simple question but... I'm a python rookie.

I'm reading an index table from a database of two columns using a fetchall() call. 

If I print this, I get something like

(100, 1)     #results[0]
(100, 10)    #results[1]
(101, 1)
(101, 5)

I want to find the index for (100, 10) without looping.  

Any suggestions gracefully accepted.

Thanks




More information about the Python-list mailing list