filtering a list

Robin Becker robin at
Mon Aug 23 09:47:29 EDT 1999

I'm uncertain as to whether this kind of construct is well formed

R is a list of instances

for i in R:
  if del R[R.index(i)]

or is it better (assuming R holds the only references to the instances)
to do

R=filter((lambda x:,R)
Robin Becker

More information about the Python-list mailing list