I have some problem which has stumped my beginner-knowledge of python and I hope someone out there can point me in the correct direction.
I generated a nested list, each
You can try using defaultdict ...
from collections import defaultdict dat = [[1, 0],[1, 2],[2, 9],[3, 0],[3, 8],[3, 1]] d = defaultdict(int) for k,v in dat: d[k] += v