deepbob ['name'{'last''smith''first''bob'bob ['name']['last''smithbob ['pay'][ bob' full name bob' last name bob' upper pay the name field is another dictionary hereso instead of splitting up stringwe simply index to fetch the last name moreoverpeople can have many jobsas well as minimum and maximum pay limits in factpython becomes sort of query language in such cases--we can fetch or change nested data with the usual object operationsfor job in bob ['job']print(jobsoftware writing all of bob' jobs >bob ['job'][- bob' last job 'writingbob ['job'append('janitor'bob gets new job bob {'job'['software''writing''janitor']'pay'( )'age' 'name'{'last''smith''first''bob'}it' ok to grow the nested list with appendbecause it is really an independent object such nesting can come in handy for more sophisticated applicationsto keep ours simplewe'll stick to the original flat record structure dictionaries of dictionaries one last twist on our people databasewe can get little more mileage out of dictionaries here by using one to represent the database itself that iswe can use dictionary of dictionaries--the outer dictionary is the databaseand the nested dictionaries are the records within it rather than simple list of recordsa dictionary-based database allows us to store and retrieve records by symbolic keybob dict(name='bob smith'age= pay= job='dev'sue dict(name='sue jones'age= pay= job='hdw'bob {'pay' 'job''dev''age' 'name''bob smith'db {db['bob'bob db['sue'sue db['bob']['name''bob smithdb['sue']['pay' db['sue']['pay' sneak preview reference in dict of dicts fetch bob' name change sue' pay fetch sue' pay