Formatting lab7_aggregator file entries

The lab specifies (and Gradescope tests for) a specific file format. Per the specification, the date, hour, temperature should be separated by commas (not spaces or other characters). Note, we use commas to make it easy for other tools or libraries, like datascience, to read in our data file. A compliant write would look like file.write("10-1-2018,12,26.2\n").

Note that newline (“\n”) at the end. Unlike print, write doesn’t automatically include a newline. We want to put the newline at the end instead of the beginning of the line. Including a newline at the beginning of the line will create a blank line at the beginning of the file.

With use of optional arguments, we can also use print to write to a file. If we check out the print documentation we see it takes an optional file argument. We can provide the object returned by open to that argument to print to file (including the newline at the end).