list1 = [2, 3, 3, 4, 4, 5]
list2 = [-4, 8, -4, 8, -1, 2]
from collections import defaultdict
d = defaultdict(int)
for k, v in zip(list1, list2):
d[k] += v
print d
bGlzdDEgPSBbMiwgMywgMywgNCwgNCwgNV0KbGlzdDIgPSBbLTQsIDgsIC00LCA4LCAtMSwgMl0KCmZyb20gY29sbGVjdGlvbnMgaW1wb3J0IGRlZmF1bHRkaWN0CgpkID0gZGVmYXVsdGRpY3QoaW50KQpmb3IgaywgdiBpbiB6aXAobGlzdDEsIGxpc3QyKToKICAgIGRba10gKz0gdgogICAgCnByaW50IGQ=