title: Python : List of dict, if exists increment a dict value, if not append a new dict
body: <p>I would like do something like that.</p>
  
  <pre><code>list_of_urls = ['http://www.google.fr/', 'http://www.google.fr/', 
                  'http://www.google.cn/', 'http://www.google.com/', 
                  'http://www.google.fr/', 'http://www.google.fr/', 
                  'http://www.google.fr/', 'http://www.google.com/', 
                  'http://www.google.fr/', 'http://www.google.com/', 
                  'http://www.google.cn/']
  
  urls = [{'url': 'http://www.google.fr/', 'nbr': 1}]
  
  for url in list_of_urls:
      if url in [f['url'] for f in urls]:
           urls[??]['nbr'] += 1
      else:
           urls.append({'url': url, 'nbr': 1})
  </code></pre>
  
  <p>How can I do ? I don't know if I should take the tuple to edit it or figure out the tuple indices?</p>
  
  <p>Any help ?</p>