so in summarythe field name syntax allows us to refer to positional and keyword arguments that are passed to the str format(method if the arguments are collection data types like lists or dictionariesor have attributeswe can access the part we want using [or notation this is illustrated in figure positional argument index { {title{ [ ]{ [capital]{ rateindex key attribute {color[ ]{point[ ]{book isbnkeyword argument name figure annotated format specifier field name examples from python it is possible to omit field namesin which case python will in effect put them in for ususing numbers starting from for example "{{{}format("python""can""count"'python can countif we are using python the format string used here would have to be "{ { { }using this technique is convenient for formatting one or two itemsbut the approach we will look at next is more convenient when several items are involvedand works just as well with python before finishing our discussion of string format field namesit is worth mentioning rather different way to get values into format string this involves using an advanced techniquebut one useful to learn as soon as possiblesince it is so convenient the local variables that are currently in scope are available from the built-in locals(function this function returns dictionary whose keys are local variable names and whose values are references to the variablesvalues now we can use mapping unpacking to feed this dictionary into the str format(method the mapping unpacking operator is *and it can be applied to mapping (such as dictionaryto produce key-value list suitable for passing to function for exampleelement "silvernumber "element {numberis {element}format(**locals()'element is silvermapping unpacking