i am having two dictionaries
first = {\'id\': 1, \'age\': 23} second = {\'id\': 4, \'out\': 100}
I want output dictionary as
{\'id\': 5, \
You can simply update the 'id' key afterwards:
'id'
result = dict(first.items() + second.items()) result['id'] = first['id'] + second['id']