title: Returning first element of a tuple after finding the tuple according to the second value in a list of tuples
body: <p>I have a list of tuples that looks something like:</p>
  <pre><code>list_of_tuples = [(1, 'a'), (2, 'b'), (3, 'c')]
  </code></pre>
  <p>I want to return the first item of the tuple after finding said tuple according to the second value. I could do something like:</p>
  <pre><code>for pair in list_of_tuples:
      if pair[1] == something:
          print(pair[0])
  
  # or
  
  [pair[0] for pair in e1_span_sent_pairs if pair[1] == something][0]
  </code></pre>
  <p>but I'm wondering if there's a way I can do this without using a for loop. Thanks.</p>