Searching two of the three characters in python
<pre><code> info=('x','y','z')
 info2=('x','Bob','y')
 match=False
 if any(all x in info for x in info2):
    match=True
    print("True")
 else:
     print("False")
</code></pre>

<p>Is that is there a way I can make it work so that it only prints <code>True</code> when <code>x</code> and either <code>y</code> or <code>z</code> are in <code>info2</code>?</p>

<p>The way I read this you want the first element in <code>info</code> (<code>info[0]</code>), and at least one other element in <code>info</code> to be in <code>info2</code></p>

<pre><code> if info[0] in info2 and any(i in info2 for i in info[1:]):
     # do stuff
</code></pre>

python python-3.4