# I have this list mylist = [ {'thing': 'A', 'count': 4}, {'thing': 'B', 'count': 2}, {'thing': 'A', 'count': 6}] # And I want to make this one where duplicates are merged newlist = [ {'thing': 'A', 'count': 10}, {'thing': 'B', 'count': 2}]
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter