is there a better way?
Schüle Daniel
uval at rz.uni-karlsruhe.de
Fri Feb 10 19:46:11 EST 2006
I don't want to hijack the thread I was thinking
whether something like lst.remove(item = 0, all = True)
would be worth adding to Python?
it could have this signature
def remove(item, nItems = 1, all = False)
...
return how_many_deleted
lst.remove(item = 0, nItems = 1)
lst.remove(item = 0, nItems = 2)
lst.remove(item = 0, all = True)
in last case nItems is ignored
Regards, Daniel
More information about the Python-list
mailing list