Quoting Jeff Shannon <[EMAIL PROTECTED]>:
> If the intent is simply to remove all lines that begin with "Name=",
> and setting those lines to an empty string is just shorthand for that,
> it'd make more sense to do this with a filtering list comprehension:
[...]
> If one wants to avoid list comprehensions, you could instead do:
[...]
Or, since we're filtering, we could use the filter() function!
probe_pairs = filter(lambda x: not x.startswith('Name='), probe_pairs)
(hmm, I wonder which is the faster option...)
--
John.
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor