Check if multiple lists contain multiple items
<p>I have a list of lists in my python code, and I want to check if <em>any</em> of those lists contains a certain two items.</p>

<pre><code>f1=['a','b']
f2=['c','d']
f3=['e','f']
f4=['g','h']
f5=['i','j']
f6=['k','l']

flist=[f1,f2,f3,f4,f5,f6]
</code></pre>

<p>I want something like:</p>

<pre><code>if 'a' in flist[0:5] and 'b' in flist[flist.index('a')]:
   print (true)
</code></pre>

<p>What's the easiest way to do this?</p>

<pre><code>for f in flist:
    if 'a' not in f:
        continue
    if 'b' not in f:
        continue
    return True
return False
</code></pre>

python list