title: Check first elements of a list of lists
body: <p>I have a list which looks like this:</p>
  
  <pre><code>List = [['name1','surname1'], ['name2','surname2'],['name3','surname3']]
  </code></pre>
  
  <p>I would like to check if "name1" is in the object "List". I have tried:</p>
  
  <pre><code>if 'name1' in List:
      print True
  else:
      print False
  </code></pre>
  
  <p>and the output is 'False'. Any idea how to create a sublist (or something similar) to check the first element of every sub-list without looping through all the elements of the main list? </p>
  
  <p><strong>POSSIBLE SOLUTION</strong></p>
  
  <p>What I have thought about is:</p>
  
  <pre><code>for i in range(0, len(List)):
      if List[i][0] == 'name1':
          print True
  </code></pre>
  
  <p>but I want to avoid exactly this iteration with something more optimized, if possible. </p>