I have the following string interpolation:
>>> a = {'test1.1': 5}
>>> 'test: {test1.1}'.format(**a)
KeyError: 'test1'
It obviously fails because format is literally trying to access the object test1 and its attribute 1. Is there a way to format this string and force the key values to be taken as strings? (Looking for a Python 2 and 3 solution.)