On Jan 30, 2008 6:57 AM, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > Or one could use the trick of counting from the right (untested): > > n = len(a) > for i, x in enumerate(a): > if x == 99: del a[i-n]
Or one can put on his bellbottoms, horn-rimmed glasses, and wear a mullet: i = 0 while i < len(a): if a[i] == 99: del a[i] else: i += 1 -- Neil Cerutti <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list