I'm trying to format a string with incomplete kwargs as below:
input is like "{key1} {key2} {key3}"
output will be like "value1 value2 {key3}"
I try below,
>>> "{key1} {key2} {key3}".format(key1='value1', key2='value2')
but got following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 'key3'
Any idea on what's the best way to do it?