What is the best way to delete strings in a string list that that match certain pattern?

Peng Yu pengyu.ut at gmail.com
Thu Nov 5 23:19:08 EST 2009


Suppose I have a list of strings, A. I want to compute the list (call
it B) of strings that are elements of A but doesn't match a regex. I
could use a for loop to do so. In a functional language, there is way
to do so without using the for loop.

I'm wondering what is the best way to compute B in python.



More information about the Python-list mailing list