can even approach the utility of sql queries herealbeit operating on in-memory objects[rec['name'for rec in people if rec['age'> ['sue jones'sql-ish query [(rec['age'* if rec['age'> else rec['age']for rec in people[ (rec['name'for rec in people if rec['age'> next( 'sue jonesg ((rec['age'* if rec['age'> else rec['age']for rec in peopleg __next__( and because dictionaries are normal python objectsthese records can also be accessed and updated with normal python syntaxfor person in peopleprint(person['name'split()[- ]person['pay'* last name raise smith jones for person in peopleprint(person['pay'] nested structures incidentallywe could avoid the last-name extraction code in the prior examples by further structuring our records because all of python' compound datatypes can be nested inside each other and as deeply as we likewe can build up fairly complex information structures easily--simply type the object' syntaxand python does all the work of building the componentslinking memory structuresand later reclaiming their space this is one of the great advantages of scripting language such as python the followingfor instancerepresents more structured record by nesting dictionarylistand tuple inside another dictionarybob {'name'{'first''bob''last''smith'}'age' 'job'['software''writing']'pay'( )step representing records