title: Python - locate element in set of tuples
body: <p>I have a set of tuples, each tuple has a finite number of elements.</p>
  
  <p>I would like to check if there is a certain element in that set,
  that has the specific component i am searching for.</p>
  
  <pre><code>set_of_tuples = {(el_11, el_12, el_13), (el_21, el_22, el_23)}
  a = (dont_care, el_12, dont_care)
  </code></pre>
  
  <p>how can i locate the tuple element in the set, that contains that specific component?</p>
  
  <p>I could do this using a list comprehension, but it is a very slow proccess.</p>
  
  <p>Using sets, with simple cases, i can do something like this:</p>
  
  <pre><code>el = (1,2)
  set_of_tuples = {(1,2), (2,3) ...}
  </code></pre>
  
  <p>i can verify if it exists, doing:
  el in set_of_tuples.</p>
  
  <p>What i asm asking, is is there is a way of doing the exact same thing, but without caring about some tuple element, for example:</p>
  
  <pre><code>el = (_,2)
  el in set_of_tuples
  </code></pre>