d = {('Tag1', '1'): 345.56, ('Tag1', '2'): 45.6, ('Tag2', '3'): 3.1, (
    'Tag3', '1'): 21.56, ('Tag2', '3'): 1.56}
keys = {k[0]: (0) for k in list(d.keys())}
for key in d:
    keys[key[0]] = keys[key[0]] + d[key]
print(keys)
how to sum values from a python dictionary having key as tuple