d = {'learning': {'DOC1': 0.14054651081081646,
'DOC2': 0,
'DOC3': 0.4684883693693881},
'life': {'DOC1': 0.14054651081081646,
'DOC2': 0.20078072972973776,
'DOC3': 0}
}
d['sum'] = [d['learning'][k] + d['life'][k]
for k in d['learning']]
print(d)
ZCA9IHsnbGVhcm5pbmcnOiB7J0RPQzEnOiAwLjE0MDU0NjUxMDgxMDgxNjQ2LAogICAgICAgICAgICAgICdET0MyJzogMCwKICAgICAgICAgICAgICAnRE9DMyc6IDAuNDY4NDg4MzY5MzY5Mzg4MX0sCiAnbGlmZSc6ICAgICB7J0RPQzEnOiAwLjE0MDU0NjUxMDgxMDgxNjQ2LCAKICAgICAgICAgICAgICAnRE9DMic6IDAuMjAwNzgwNzI5NzI5NzM3NzYsIAogICAgICAgICAgICAgICdET0MzJzogMH0KfQoKZFsnc3VtJ10gPSBbZFsnbGVhcm5pbmcnXVtrXSArIGRbJ2xpZmUnXVtrXQogICAgICAgICAgICBmb3IgayBpbiBkWydsZWFybmluZyddXQpwcmludChkKQ==
{'learning': {'DOC2': 0, 'DOC3': 0.4684883693693881, 'DOC1': 0.14054651081081646}, 'sum': [0.20078072972973776, 0.4684883693693881, 0.2810930216216329], 'life': {'DOC2': 0.20078072972973776, 'DOC3': 0, 'DOC1': 0.14054651081081646}}