data dict(platform=sys platformkind='laptop''my {kind: }format(**data'my laptop runs win 'my %(kind)- runs %(platform) sdata 'my laptop runs win as we'll see in the **data in the method call here is special syntax that unpacks dictionary of keys and values into individual "name=valuekeyword arguments so they can be referenced by name in the format string--another unavoidable far conceptual forward reference to function call toolswhich may be another downside of the format method in generalespecially for newcomers as usualthoughthe python community will have to decide whether expressionsformat method callsor toolset with both techniques proves better over time experiment with these techniques on your own to get feel for what they offerand be sure to see the library reference manuals for python and later for more details string format method enhancements in python and python and added thousand-separator syntax for numberswhich inserts commas between three-digit groups to make this workadd comma before the type codeand between the width and precision if presentas follows'{ : }format( ' '{ :, }format( ' , , , these pythons also assign relative numbers to substitution targets automatically if they are not included explicitlythough using this extension doesn' apply in all use casesand may negate one of the main benefits of the formatting method--its more explicit code'{:, }format( ' , , , '{:, {:, }format( ' , , , , '{: }format( ' , see the release notes for more details see also the formats py commainsertion and money-formatting function examples in for simple manual solution that can be imported and used prior to python and as typical in programmingit' straightforward to implement new functionality in callablereusableand customizable function of your ownrather than relying on fixed set of built-in toolsfrom formats import commasmoney '%scommas( ' , , , '% % (commas( )commas( )string formatting method calls