def sum_dicts(dicts):
 sum_dict = {}
 for val_dict in dicts:
  for (id_, value) in val_dict.items():
   if (id_ in sum_dict):
    sum_dict[id_] = (sum_dict[id_] + value)
   else:
    sum_dict[id_] = value
 return sum_dict

def sum_dicts ( dicts ) : sum_dict = { } for val_dict in dicts : for ( id_ , value ) in val_dict . items ( ) : if ( id_ in sum_dict ) : sum_dict [ id_ ] = ( sum_dict [ id_ ] + value ) else : sum_dict [ id_ ] = value return sum_dict
sums the dictionaries entrywise .