data types when we take detailed look at format specifications we will now study each part of the replacement field in turnstarting with field names field names field name can be either an integer corresponding to one of the str format(method' argumentsor the name of one of the method' keyword arguments we discuss keyword arguments in but they are not difficultso we will provide couple of examples here for completeness"{whoturned {agethis yearformat(who="she"age= 'she turned this year"the {whowas { last weekformat( who="boy"'the boy was last weekthe first example uses two keyword argumentswho and ageand the second example uses one positional argument (the only kind we have used up to nowand one keyword argument notice that in an argument listkeyword arguments always come after positional argumentsand of course we can make use of any arguments in any order inside the format string field names may refer to collection data types--for examplelists in such cases we can include an index (not slice!to identify particular itemstock ["paper""envelopes""notepads""pens""paper clips""we have { [ ]and { [ ]in stockformat(stock'we have envelopes and notepads in stockthe refers to the positional argumentso { [ ]is the stock list argument' second itemand { [ ]is the stock list argument' third item later on we will learn about python dictionaries these store key-value itemsand since they can be used with str format()we'll just show quick example here don' worry if it doesn' make senseit will once you've read dict(animal="elephant"weight= "the { [animal]weighs { [weight]}kgformat( 'the elephant weighs kgjust as we access list and tuple items using an integer position indexwe access dictionary items using key we can also access named attributes assuming we have imported the math and sys moduleswe can do this"math pi=={ pisys maxunicode=={ maxunicode}format(mathsys'math pi== sys maxunicode== dict type