Question: python 3.6 read_file ( filename ) : This is the *only* function that needs to deal with reading a file. It will accept the file
python 3.6
read_file ( filename ) : This is the *only* function that needs to deal with reading a file. It will accept the file name, assume it is a CSV file as described above (with our hurricane date in the same format as the example, but with any number of rows after the header row). It will open the file, read all the described storms, and correctly create the database . It returns that database.
>>>d1 = read_file("file1.csv")
>>>d1
{1992: [('Andrew', 5, 62, 66730)], 2012:
[('Isaac', 1, 5, 24000), ('Sandy', 2, 159,
75000)]}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
