ways to format the same typefor instance% %fand % provide alternative ways to format floating-point numbers table - string formatting type codes code meaning string (or any object' str(xstringr same as sbut uses reprnot str character (int or strd decimal (base- integeri integer same as (obsoleteno longer unsignedo octal integer (base hex integer (base same as xbut with uppercase letters floating point with exponentlowercase same as ebut uses uppercase letters floating-point decimal same as fbut uses uppercase letters floating-point or floating-point or literal (coded as %%in factconversion targets in the format string on the expression' left side support variety of conversion operations with fairly sophisticated syntax all their own the general structure of conversion targets looks like this%[(keyname)][flags][width]precision]typecode the type code characters in the first column of table - show up at the end of this target string' format between the and the type code characteryou can do any of the followingprovide key name for indexing the dictionary used on the right side of the expression list flags that specify things like left justification (-)numeric sign (+) blank before positive numbers and for negatives ( space)and zero fills ( give total minimum field width for the substituted text set the number of digits (precisionto display after decimal point for floatingpoint numbers string formatting expressions