title: Python Nested lists and iteration
body: <p><em>I am new to Python and I did my search but I could not find what I am looking for. I apologise in advance if this question has been asked and if I could not find it due to my lack of not knowing the name of what I am trying to achieve. I will gladly read any document you might suggest.</em></p>
  
  <p>I have a list of lists. e.g. => [int, 'str']</p>
  
  <pre><code>t = [[0234, 'str_0'],
       [1267, 'str_1'],
       [2445, 'str_2']]
  </code></pre>
  
  <p>I want to find out if <strong><code>a str</code></strong> exists in index(1) position of one of the lists of <strong>list t</strong>.
  I can do this with a function containing 2 for or while loops but what I am seeking is to achieve this, if possible, using one single iteration. I want to learn the shortest function.</p>
  
  <p><code>for input str('str_3'), I want to get int(2)</code> (index of the list which has str_3 on its own 1st index location) 
  for str_1, I want to get int(0)</p>
  
  <p>and for <strong>str_1234</strong> I want to get <strong>False</strong> as it is not in any of the lists within the <strong><code>list t</code></strong></p>
  
  <p>As a newbie, I would normally do:</p>
  
  <pre><code>for n in range(len(t)):
      if t[n][1] == 'str_1'
          return n
      return False
  </code></pre>
  
  <p>What I am seeking to get is, if possible, a better and shorter way of achieving this in one line of a code or just simply to learn if there is a smarter, better or more pythonic way that any one of you who is surely more experienced would recommend.</p>
  
  <p>Thank you</p>