title: print first element of tuple if any other element matches in python
body: <p>I have a tuple in a list like </p>
  
  <pre><code>A = [(2, 'two', '2nd', 'second')]
  </code></pre>
  
  <p>and I am getting a variable 'B' which is possibly rest of elements in the list 'A' except first element. </p>
  
  <p>For example:</p>
  
  <pre><code>B = ['two'] # or ['2nd'], or ['second']
  </code></pre>
  
  <p>I want to print first element of tuple 'A' if the variable 'B' matches with tuple 'A'</p>
  
  <p>I have tried </p>
  
  <pre><code>[x for x,y,z,t in a[0] if  b[0] == y or b[0] == z or b[0] == t ]
  </code></pre>
  
  <p>I am getting below error.</p>
  
  <blockquote>
    <p>TypeError: 'int' object is not iterable</p>
  </blockquote>
  
  <p>Please help.</p>