Is there a way to have a default value when doing string formatting? For example: s = "Text {0} here, and text {1} there" s.format('foo', 'bar') What I'm looking for is setting a default value for a numbered index, so that it can be skipped in the placeholder, e.g. something like this: s = "Text {0:'default text'} here, and text {1} there" I checked https://docs.python.org/3/tutorial/inputoutput.html#tut-f-strings and didn't find what I need, maybe looking in the wrong place? Thanks. Continue reading...