Let's say, I need to build a series of strings based on this pattern:
pattern="{app: }"
with an ultimate goal of generating the below sequence:
"{app: MS Office }"
"{app: Notepad }" etc.
I'm trying to do that using the format method, like so
insert="MS Office"
result=pattern.format(insert)
However, all I get back is
KeyError: 'app'
It does look like the error is caused by Python misinterpreting the colon in the pattern, but what how do I get around it? I do need the colon.
Thanks.
.