Use all()
if not all(target_string in lst for lst in lst_of_lsts):
raise ValueError('One or more lists does not contain "%s"' % (target_string))
The generator gives Trueeither Falsefor each individual test, and all()checks whether they are all true. Since we use a generator, the estimate is lazy, that is, it stops when the first one is Falsefound without evaluating the full list.
Or if double inon the same label seems confusing, you can
if not all((target_string in lst) for lst in lst_of_lsts):
raise ValueError('One or more lists does not contain "%s"' % (target_string))
, .