Pablo Ziliani wrote: > <joke> > > I always use this full-featured, all-inclusive, rock-solid version > (see the try/except block): > > count = i = 0 > x = 1 > y = [1,2,3,4,5,1,2,3,4,1,2,1] > try: > while count < 3: > if y[i] == x: > count += 1 > i += 1 > except RuntimeError: > pass > except IndexError: > pass > else: > print x > > </joke>
Wrong, this must be just except: pass Regards&CNRE, Björn -- BOFH excuse #141: disks spinning backwards - toggle the hemisphere jumper. -- http://mail.python.org/mailman/listinfo/python-list