colnames [desc[ for desc in curs descriptioncolnames ['name''job''pay'for row in curs fetchall()for namevalue in zip(colnamesrow)print(name'\ =>'valueprint(name =sue job =mus pay = name job pay =ann =mus = name job pay =kim =adm = notice how tab character is used to try to make this output aligna better approach might be to determine the maximum field name length (we'll see how in later examplerecord dictionaries construction it' minor extension of our formatted display code to create dictionary for each recordwith field names for keys--we just need to fill in the dictionary as we gocurs execute('select from people'colnames [desc[ for desc in curs descriptionrowdicts [for row in curs fetchall()newdict {for nameval in zip(colnamesrow)newdict[nameval rowdicts append(newdictfor row in rowdictsprint(row{'pay' 'job''mus''name''sue'{'pay' 'job''mus''name''ann'{'pay' 'job''adm''name''kim'because this is pythonthoughthere are more powerful ways to build up these record dictionaries for instancethe dictionary constructor call accepts the zipped namevalue pairs to fill out the dictionaries for uscurs execute('select from people'colnames [desc[ for desc in curs descriptionrowdicts [for row in curs fetchall()rowdicts appenddict(zip(colnamesrow) databases and persistence