iterating through lists to delete elements

Rich Harkins rharkins at thinkronize.com
Thu Aug 9 12:08:35 EDT 2001


How about (in Python 2.x-ish):

list=[x for x in list where x <= y]  # assuming you want to keep everything
<= y.

Rich






More information about the Python-list mailing list