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.