python careeryou'll probably find uses for all of these dictionary-creation forms as you start applying them in realisticflexibleand dynamic python programs the listings in this section document the various ways to create dictionaries in both python and howeverthere is yet another way to create dictionariesavailable only in python and the dictionary comprehension expression to see how this last form lookswe need to move on to the next and final section of this why you will caredictionaries versus lists with all the objects in python' core types arsenalsome readers may be puzzled over the choice between lists and dictionaries in shortalthough both are flexible collections of other objectslists assign items to positionsand dictionaries assign them to more mnemonic keys because of thisdictionary data often carries more meaning to human readers for examplethe nested list structure in row of table - could be used to represent record tool ['bob' ['dev''mgr'] [ 'bobl[ [ ][ 'mgrlist-based "recordpositions/numbers for fields for some types of datathe list' access-by-position makes sense-- list of employees in companythe files in directoryor numeric matrixesfor example but more symbolic record like this may be more meaningfully coded as dictionary along the lines of row in table - with labeled fields replacing field positions (this is similar to record we coded in ) {'name''bob''age' 'jobs'['dev''mgr'] ['name''bobd['age'dictionary-based "record ['jobs'][ names mean more than numbers 'mgrfor varietyhere is the same record recoded with keywordswhich may seem even more readable to some human readersd dict(name='bob'age= jobs=['dev''mgr'] ['name''bobd['jobs'remove('mgr' {'jobs'['dev']'age' 'name''bob'in practicedictionaries tend to be best for data with labeled componentsas well as structures that can benefit from quickdirect lookups by nameinstead of slower linear searches as we've seenthey also may be better for sparse collections and collections that grow at arbitrary positions dictionaries in action