python: check if substring is in tuple of strings
<p>Which is the most elegant way to check if there is an occurrence of several substrings in a tuple of strings?</p>

<pre><code>tuple = ('first-second', 'second-third', 'third-first') 
substr1 = 'first' 
substr2 = 'second' 
substr3 = 'third'
#if substr1 in tuple and substr2 in tuple and substr3 in tuple:
#    should return True
</code></pre>

<pre><code>any(substr in str_ for str_ in tuple_)
</code></pre>

<p>You can start with that and look at <code>all()</code> as well.</p>

python substring tuples