Dave> This should be simple, but I can't get it:
Dave> How do you loop backwards through a list?
Standard idiom:
for i in range(len(mylist)-1, -1, -1):
do_stuff()
Contrast that with the standard forward loop:
for i in range(len(mylist)):
do_stuff()
So, to go backwards, just add "-1, -1, -1" to the range function in the
forward loop version.
Skip
--
http://mail.python.org/mailman/listinfo/python-list
