A step-counter app keeps each user as a dictionary. Every night, it saves them all to a CSV file with a header row.
Task: write save_records(path, records, columns).
records is a list of dictionaries. Every dictionary has every key in columns, and may have extra keys too.columns is a list of the column names, in the order they should appear.Write a CSV to path with csv.writer. The first row is columns, then one row per record, holding that record's values in columns order. Extra keys are left out. Open the file with newline="".
Then read the file back with csv.reader and return the list of lists it gives. Everything comes back as text, so numbers you saved come back as strings.
import csv is already at the top of the starter code.