when written as literalsdictionaries are coded in curly braces and consist of series of "keyvaluepairs dictionaries are useful anytime we need to associate set of values with keys--to describe the properties of somethingfor instance as an exampleconsider the following three-item dictionary (with keys "food,"quantity,and "color,perhaps the details of hypothetical menu item?) {'food''spam''quantity' 'color''pink'we can index this dictionary by key to fetch and change the keysassociated values the dictionary index operation uses the same syntax as that used for sequencesbut the item in the square brackets is keynot relative positiond['food''spamfetch value of key 'foodd['quantity'+ add to 'quantityvalue {'color''pink''food''spam''quantity' although the curly-braces literal form does see useit is perhaps more common to see dictionaries built up in different ways (it' rare to know all your program' data before your program runsthe following codefor examplestarts with an empty dictionary and fills it out one key at time unlike out-of-bounds assignments in listswhich are forbiddenassignments to new dictionary keys create those keysd { ['name''bobd['job''devd['age' create keys by assignment {'age' 'job''dev''name''bob'print( ['name']bob herewe're effectively using dictionary keys as field names in record that describes someone in other applicationsdictionaries can also be used to replace searching operations--indexing dictionary by key is often the fastest way to code search in python as we'll learn laterwe can also make dictionaries by passing to the dict type name either keyword arguments ( special name=value syntax in function calls)or the result of zipping together sequences of keys and values obtained at runtime ( from filesboth the following make the same dictionary as the prior example and its equivalent {literal formthough the first tends to make for less typingbob dict(name='bob'job='dev'age= bob {'age' 'name''bob''job''dev' introducing python object types keywords