Following snap is taken from here: mkaz.blog/code/python-string-format-cookbook. Go there, there are more examples