db['bob']['jobs'later in the book we'll meet tools such as python' shelvewhich works much the same waybut automatically maps objects to and from files to make them permanent (watch for more in this sidebar "why you will caredictionary interfaceson page other ways to make dictionaries finallynote that because dictionaries are so usefulmore ways to build them have emerged over time in python and laterfor examplethe last two calls to the dict constructor (reallytype nameshown here have the same effect as the literal and keyassignment forms above them{'name''bob''age' traditional literal expression { ['name''bobd['age' assign by keys dynamically dict(name='bob'age= dict keyword argument form dict([('name''bob')('age' )]dict key/value tuples form all four of these forms create the same two-key dictionarybut they are useful in differing circumstancesthe first is handy if you can spell out the entire dictionary ahead of time the second is of use if you need to create the dictionary one field at time on the fly the third involves less typing than the firstbut it requires all keys to be strings the last is useful if you need to build up keys and values as sequences at runtime we met keyword arguments earlier when sortingthe third form illustrated in this code listing has become especially popular in python code todaysince it has less syntax (and hence there is less opportunity for mistakesas suggested previously in table - the last form in the listing is also commonly used in conjunction with the zip functionto combine separate lists of keys and values obtained dynamically at runtime (parsed out of data file' columnsfor instance)dict(zip(keyslistvalueslist)zipped key/value tuples form (aheadmore on zipping dictionary keys in the next section provided all the key' values are the same initiallyyou can also create dictionary with this special form--simply pass in list of keys and an initial value for all of the values (the default is none)dict fromkeys([' '' '] {' ' ' ' lists and dictionaries