take their values from the next item in the input values on the expression' right side (useful when this isn' known until runtimeand if you don' need any of these extra toolsa simple % in the format string will be replaced by the corresponding value' default print stringregardless of its type advanced formatting expression examples formatting target syntax is documented in full in the python standard manuals and reference textsbut to demonstrate common usagelet' look at few examples this one formats integers by defaultand then in six-character field with left justification and zero paddingx res 'integers% %- % (xxxres 'integers the % %fand % formats display floating-point numbers in different waysas the following interaction demonstrates--% is the same as % but the exponent is uppercaseand chooses formats by number content (it' formally defined to use exponential format if the exponent is less than - or not less than precisionand decimal format otherwisewith default total digits precision of ) shows more digits before and '% % % (xxx' + '%ex ' + for floating-point numbersyou can achieve variety of additional formatting effects by specifying left justificationzero paddingnumeric signstotal field widthand digits after the decimal point for simpler tasksyou might get by with simply converting to strings with % format expression or the str built-in function shown earlier'%- % %+ (xxx' + '%sxstr( (' '' 'when sizes are not known until runtimeyou can use computed width and precision by specifying them with in the format string to force their values to be taken from the next item in the inputs to the right of the operator--the in the tuple here gives precision'% * ( ' string fundamentals