operators and expressions '{ : }format(yr '{ :+ }format(yr '{ :+ }format(yr '{ :+ %}format(yr + + '+ + %parts of format specifier can optionally be supplied by other fields supplied to the format function they are accessed using the same syntax as normal fields in format string for exampley '{ :{width{precision} }format( ,width= ,precision= '{ :{ { } }format( , , this nesting of fields can only be one level deep and can only occur in the format specifier portion in additionthe nested values cannot have any additional format specifiers of their own one caution on format specifiers is that objects can define their own custom set of specifiers underneath the coversadvanced string formatting invokes the special method _format_ (selfformat_specon each field value thusthe capabilities of the format(operation are open-ended and depend on the objects to which it is applied for exampledatestimesand other kinds of objects may define their own format codes in certain casesyou may want to simply format the str(or repr(representation of an objectbypassing the functionality implemented by its _format_ (method to do thisyou can add the '!sor '!rmodifier before the format specifier for examplename "guidor '{ ! :^ }format(namer 'guidooperations on dictionaries dictionaries provide mapping between names and objects you can apply the following operations to dictionariesoperation description [kd[kx del [kk in len(dindexing by key assignment by key deletes an item by key tests for the existence of key number of items in the dictionary key values can be any immutable objectsuch as stringsnumbersand tuples in additiondictionary keys can be specified as comma-separated list of valueslike thisd [ , , "food[ , , "barin this casethe key values represent tuplemaking the preceding assignments identical to the followingd[( , , )"food[( , , )"barf lib fl ff