I have a python dictionary called signames with thousands of key value pairs. A truncated version:
signames = {'A_13342_2674_14_': '13342-2674-14.03-0-2-1', 'A_13342_2675_14_': '13342-2675-14.03-0-2-1', 'A_13342_2676_14_': '13342-2676-14.03-0-2-1'}
I want to append the character _ to the beginning all values within the python dictionary so that the final dictionary would look like:
signames = {'A_13342_2674_14_': '_13342-2674-14.03-0-2-1', 'A_13342_2675_14_': '_13342-2675-14.03-0-2-1', 'A_13342_2676_14_': '_13342-2676-14.03-0-2-1'}
My code produces no error but doesn't update the values:
for key, value in signames.items():
key = str(_) + key