title: Python: deleting similar objects from a list using difflib.SequenceMatcher
body: <p>Let's say I have a list of some strings, and there are certain strings there that very, very similar. And I want to delete those <em>almost duplicates</em>. For that, I came up with the following code:</p>
  
  <pre><code>from difflib import SequenceMatcher
  
  l = ['Apple', 'Appel', 'Aple', 'Mango']
  c = [l[0]]
  
  for i in l:
      count = 0
      for j in c:
          if SequenceMatcher(None, i, j).ratio() &lt; 0.7:
              count += 1
      if count == len(c):
          c.append(i)
  </code></pre>
  
  <p>Which seems to work fine but I don't really like nested loops and also this <code>count</code> solution looks ugly. But probably it's possible to write it down in a more Pythonic way? Using generators, may be?</p>
  
  <p>Would be grateful for a hint, thanks :)</p>