iterating through lists to delete elements

Joseph A. Knapka jknapka at earthlink.net
Thu Aug 9 15:49:52 EDT 2001


Bjorn Pettersen wrote:
> 
> > From: Mark Robinson [mailto:m.1.robinson at herts.ac.uk]
> >
> > Can anyone advise me the best way to iterate through a list
> > and deleting
> > elements that don't meet a certain criteria.
> 
> You can use either filter or list comprehensions:

So it seems that (shudder) There's More Than One
Way To Do It. Isn't there supposed to be one (obvious)
way?

-- Joe Knapka
"You know how many remote castles there are along the gorges? You
 can't MOVE for remote castles!" -- Lu Tze re. Uberwald
// Linux MM Documentation in progress:
// http://home.earthlink.net/~jknapka/linux-mm/vmoutline.html
2nd Lbl A + 1 = 2nd Pause 2nd Prt GTO 2 R/S



More information about the Python-list mailing list