Problems retrieving items from a list using a reference rather than an integer - can you help?

Rogue9 lol at
Wed Jul 16 23:57:16 CEST 2003

I´m trying to retrieve an item from a list using a reference called
´draw´' (which is an integer from 1 to 792 in a while loop) using:-

draw = 1
while 1:
	if draw == 792:
	b1 = someOtherList[draw-1]
	r1 = b1[draw]
	draw = draw+1

However,the item I expect is not being retrieved i.e. a zero is the result
of the retrieval rather than the integer in the list I was expecting.
Furthermore,when I substitute an integer for draw e.g. r1 = b1[12],I
do get the expected result.
Can anyone enlighten me as to why and how to get over this please?
Lol McBride

More information about the Python-list mailing list