return ret

def replace_values(dicts, replacments):
    """ Replace values in each dict in dicts """
for dct in dicts:
    revdict = reverse(dct)
for oldval, newval in replacments.items():
    for key in revdict.get(oldval, []):
        dct[key] = newval
replace_values(my_dicts, {'value2': 'value3'})
print(my_dicts)
Edit the values in a list of dictionaries?