Daftar setDefault Python Dict

newdata = {}
for k, v in DATA_SOURCE:
    newdata.setdefault(k, []).append(v)
Rusty Gun