iterating through lists to delete elements

gzeljko gzeljko at sezampro.yu
Thu Aug 9 12:21:20 EDT 2001


From: Mark Robinson <m.1.robinson at herts.ac.uk>
Subject: iterating through lists to delete elements

> Can anyone advise me the best way to iterate through a list and deleting 
> elements that don't meet a certain criteria.

some_list = [ x for x in some_list if some_test(x) ]

gzeljko






More information about the Python-list mailing list