title: Python : Find tuples from a list of tuples having duplicate data in the 0th element(of the tuple)
body: <p>I am having a list of tuples containing <strong>filename</strong> and <strong>filepath</strong>.
  I want to find duplicates <strong>filename</strong>(but <strong>filepath</strong> may be different) i.e. tuples whose filename is same but <strong>filepath</strong> may be different.</p>
  
  <p>Example of a list of tuples:</p>
  
  <pre><code>file_info = [('foo1.txt','/home/fold1'), ('foo2.txt','/home/fold2'), ('foo1.txt','/home/fold3')]
  </code></pre>
  
  <p>I want to find the duplicate filename i.e. file_info[2](in the above case) print it and delete it.
  I possibly could iteratively check like:</p>
  
  <pre><code>count = 0
  for (filename,filepath) in file_info:
      count = count + 1
      for (filename1,filepath1) in file_info[count:]:
          if filename == filename1:
              print filename1,filepath1
              file_info.remove((filename1,filepath1))
  </code></pre>
  
  <p>But is there a more efficient/shorter/more correct/pythonic way of accomplishing the same task.
  Thank You.</p>