I need to write a mergeSort function that will merge two files, and sort the lists contained in the files in alphabetical order based on a word in the list. The file will look something like this once merged:
['Bud', 'Abbott', 51, 92.3]
['Mary', 'Boyd', 52, 91.4]
['Jill', 'Carney', 53, 76.3]
['Jeff', 'Zygna', 50, 82.1]
['Don', 'Adams', 51, 90.4]
['Randy', 'Newman', 50, 41.2]
['Fred', 'Quicksand', 51, 88.8]
['John', 'Ziley', 53, 90.1]
The lists are arranged in the order: firstName, lastName, course, grade. What I am attempting to do is sort the lists in alphabetical order based on the last name after merging them. How would I begin to do that?