data types fill align sign width precision type any character except left right center pad between sign and digits for numbers -pad numbers minimum field width force signsign if neededspace or as appropriate prefix ints with oor use commas for grouping maximum field width for stringsnumber of decimal places for floatingpoint numbers ints bcdnoxxfloats eefggnfigure the general form of format specification "{ : }format(sminimum width 'the sword of truth "{ :> }format(sright alignminimum width the sword of truth"{ :^ }format(scenter alignminimum width the sword of truth "{ :-^ }format(sfillcenter alignminimum width '---the sword of truth----"{ < }format(sfillleft alignminimum width 'the sword of truth "{ }format(smaximum width 'the sword in the penultimate example we had to specify the left alignment (even though this is the defaultif we left out the <we would have and this simply means maximum field width of characters as we noted earlierit is possible to have replacement fields inside format specifications this makes it possible to have computed formats herefor exampleare two ways of setting string' maximum width using maxwidth variablemaxwidth "{ }format( [:maxwidth]'the sword of"{ { }}format(smaxwidth'the sword ofthe first approach uses standard string slicingthe second uses an inner replacement field the grouping comma was introduced with python