Python neophyte here. I was wondering if someone could help with the KeyError I am getting when using a dictionary for string interpolation in str.format.
KeyError
I think what you are looking for is:
dictionary = {'key1': 'val1', '1': 'val2'} string2 = 'Interpolating {key1}'.format(**dictionary) print string2