One final spectacular part of the code is to automatically return the number and percentage of votes per county, and which county had the largest turnout. The code that performs this analysis is below:
You can also see tht in the middle of this code above there is a print function to show the results in the terminal and then there is a piece that will write the results to your text output file. All in all, this code can be used for any state election so long as the files are in the same format as the one used in this analysis.