be used to format single item it' more concise alternative to the string format methodand is roughly similar to formatting single item with the formatting expressionstring method '{ }format( ' format( '' ' ' built-in function expression technicallythe format built-in runs the subject object' __format__ methodwhich the str format method does internally for each formatted item it' still more verbose than the original expression' equivalent herethough--which leads us to the next section comparison to the formatting expression if you study the prior sections closelyyou'll probably notice that at least for positional references and dictionary keysthe string format method looks very much like the formatting expressionespecially in advanced use with type codes and extra formatting syntax in factin common use cases formatting expressions may be easier to code than formatting method callsespecially when you're using the generic % print-string substitution targetand even with autonumbering of fields added in and print('% =% ('spam' )format expressionin all / print('{ }={ }format('spam' )format methodin and print('{}={}format('spam' )with autonumberingin and as we'll see in momentmore complex formatting tends to be draw in terms of complexity (difficult tasks are generally difficultregardless of approach)and some see the formatting method as redundant given the pervasiveness of the expression on the other handthe formatting method also offers few potential advantages for examplethe original expression can' handle keywordsattribute referencesand binary type codesalthough dictionary key references in format strings can often achieve similar goals to see how the two techniques overlapcompare the following expressions to the equivalent format method calls shown earlier'% % and % ( [ ]' and [ ]arbitrary types 'my %(kind) runs %(platform) {'kind''laptop''platform'sys platform'my laptop runs win 'my %(kind) runs %(platform)sdict(kind='laptop'platform=sys platform'my laptop runs win somelist list('spam'string formatting method calls