note that at the end of the sort entries alpha method definitioni use the del command to make sure that tmp disappears need to do this because lists are mutableand python assignment is by reference not value (see for more discussion on reference vs valueif do not remove tmpthe tmp might float around as reference to the entrieslist attributeit shouldn'tbut ' paranoid so explicitly deallocate tmp to make sure some final commentsfirstif you would like to read more on sorting in pythonplease see sorted function is very versatile secondthere are some diagnostics at the end of bibliog py that are run if you typepython bibliog py from the operating system command line this is one way of writing very basic test to make sure that module works (python has solid unit testing basic testing of programs framework in the form of the unittest moduleif you're interested in something more robust these diagnosticshoweverare not implemented if you import bibliog py as module this is due to the conditionalif name =main 'which is true only if the module is being run as main programi by the python command if you import the module for use in another moduleby using importthe variable name will not have the string value main 'and the diagnostics will not execute what sort entries alpha illustrates about oop let' pause to think for moment about the method sort entries alpha what have we just donefirstwe sorted list of items that are totally differently structured from each other based on two shared types of data (attributessecondwe did the sort using sorting function that does not care about the details of the items being sortedonly that they had these two shared types of data in other wordsthe sorting function doesn' care about the source type ( articlebook)only that all source types have the attributes authorlast and authorfirst this doesn' seem that big dealbut think about how we would have had comparing oop vs to do it in traditional procedural programming firsteach instance would procedural for have been an arraywith label of what kind of source it isfor instancea sorting example nature_array ["article""smith""jane""my nobel prize-winning paper""nature"" "" - "" "