from sqlite import connect conn connect('dbase 'curs conn cursor(trycurs execute('drop table people'exceptpass did not exist curs execute('create table people (name char( )job char( )pay int( ))'curs execute('insert into people values (???)'('bob''dev' )curs execute('insert into people values (???)'('sue''dev' )curs execute('select from people'for row in curs fetchall()print(rowcurs execute('select from people'colnames [desc[ for desc in curs descriptionwhile trueprint('- row curs fetchone(if not rowbreak for (namevaluein zip(colnamesrow)print('% =% (namevalue)conn commit(save inserted records refer to prior sections in this tutorial if any of the code in this script is unclear when runit creates two-record database and lists its content to the standard output streamc:\pp \dbase\sqltestdb py ('bob''dev' ('sue''dev' name =bob job =dev pay = name =sue job =dev pay = as isthis example is really just meant to demonstrate the database api it hardcodes database namesand it re-creates the database from scratch each time we could turn this code into generally useful tools by refactoring it into reusable partsas we'll see later in this section firstthoughlet' explore techniques for getting data into our databases sql database interfaces