def foo(sample, strings):
        for s in strings:
                if sample in s:
                        return True
        return False

This was an order of magnitude faster for me than using str.find or
str.index.  That was finding rare words in the entire word-list (w/
duplicates) of War and Peace.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to