Hi,

I'm just starting to learn Python, so please bear with me. I have in my 
program an object (recs) which is a list of tuples (returned as such by a 
database query).

My question is doubtless a very easy one to answer: Say I want the ninth 
element in the twentieth tuple put into variable PID, I can do this, 
bearing in mind that numbering starts at zero:

tup = recs[19]
PID = tup[8]

But there must be an easier way; i.e. to do it in one go without the 
extra variable. How do I achieve that please?

Secondly, I am more than happy to read the fine manuals. If someone could 
point me in the direction of one or two "for idiots" guides, that would 
be greatly appreciated.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to