N
Neil Cerutti
Neil Cerutti said:Or one can put on his bellbottoms, horn-rimmed glasses, and wear a mullet:
i = 0
while i < len(a):
if a == 99:
del a
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))
Heh.
<lamely>It's probably a fairly peppy quadratic operation though.</lamely>
Besides, wherever will I find plutonium or a bolt of lightning?