Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. from collections import defaultdict
  2. test = defaultdict(dict)
  3. for item in debitlist:
  4. if not something:
  5. test[item[name]]['count'] += 1
  6. test[item[amount]]['amount'] += test[item[amount]]['amount']
  7.  
  8. { "Krishna" : { "count" : totalcount, "amount" : totalamount } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement