"Neil Cerutti" <[EMAIL PROTECTED]> writes: > 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
Quadratic time!! Yowch!! Back to the future: def rocket_science(xs): for x in xs: if x != 99: yield x a[:] = list(rocket_science(a)) ;-) -- http://mail.python.org/mailman/listinfo/python-list