This works. But I’d prefer to use the str.format() option consistently. Am i missing something or is it really true that str.format() has this shortcoming?
It seems like you’ve run into a common issue with using curly braces in a string when using str.format(). To overcome this, you can use double curly braces {{ and }} to represent literal curly braces in your format string.
This way, you can use str.format() consistently without any issues. I hope this explanation helps! For more details on HTML and CSS concepts, you can follow the below links