I would like to use Python string's format() to act as a quick and dirty template. However, the dict that I would like to use has keys which are (string representations) of integers. a simplified example follows:
s = 'hello there {5}'
d = {'5': 'you'}
s.format(**d)
the above code throws the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: tuple index out of range
is it possible to do the above?
stras a variable name as it will override the builtinstrclass.{[5]}would work if the key was actually an integer.