Confused over Lists

Michael Hudson mwh at python.net
Fri Aug 2 16:35:32 CEST 2002


"Mark McEahern" <marklists at mceahern.com> writes:

> > If I have a list of items, and wish to test each item, and remove those
> > items that meet a certain criteria, I assumed I could use list.remove()
> 
> Short answer:  Use filter.

Or a list comprehension.

Cheers,
M.

-- 
  I would hereby duly point you at the website for the current pedal
  powered submarine world underwater speed record, except I've lost
  the URL.                                         -- Callas, cam.misc



More information about the Python-list mailing list