self age age self pay pay self job job if __name__ ='__main__'bob person('bob smith' 'software'sue person('sue jones' 'hardware'print(bob namesue payprint(bob name split()[- ]sue pay * print(sue paythere is not much to this class--just constructor method that fills out the instance with data passed in as arguments to the class name it' sufficient to represent database recordthoughand it can already provide tools such as defaults for pay and job fields that dictionaries cannot the self-test code at the bottom of this file creates two instances (recordsand accesses their attributes (fields)here is this file' output when run under idle ( system command-line works just as well)bob smith smith this isn' database yetbut we could stuff these objects into list or dictionary as before in order to collect them as unitfrom person_start import person bob person('bob smith' sue person('sue jones' people [bobsuefor person in peopleprint(person nameperson paya "databaselist bob smith sue jones [(person nameperson payfor person in peoplex [('bob smith' )('sue jones' )[rec name for rec in people if rec age > ['sue jones'sql-ish query [(rec age * if rec age > else rec agefor rec in people[ notice that bob' pay defaulted to zero this time because we didn' pass in value for that argument (maybe sue is supporting him now?we might also implement class that represents the databaseperhaps as subclass of the built-in list or dictionary typeswith insert and delete methods that encapsulate the way the database is implemented we'll abandon this path for nowthoughbecause it will be more useful to store these sneak preview