> How about using a try loop every time you read from > the list. try is not a loop.
> try: > x=list[someno] > except: > x=nothing(or whatever) > > This goes on till the all lists start returning none. No, sorry it just does it once. try/except is for detecting errors not a looping construct. > for shorter lists try throws an index out of range > exception which is caught by except. This much is true. But to do as you suggest the try/except would need to be placed inside a for or while loop. However that would be an interesting approach. I don't know if it would be faster than comparing the len(), I suspect not, but try/except is fairly fast so it just might be. Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor