challenge:consolidate counts of identical DB SELECTed records & delDup

PHOTO EMBED

Thu Dec 23 2021 21:36:27 GMT+0000 (Coordinated Universal Time)

Saved by @LeadingQ #python

# 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}]
content_copyCOPY

https://elisabethirgens.github.io/notes/2021/12/step-away/