Overview of Python CSV API classes
Python provides four primary classes in the csv module for interacting with tabular data:
csv.writer(): Writes sequences (lists/tuples) to a CSV file.csv.DictWriter(): Writes dictionaries to a CSV file, mapping keys to headers.csv.reader(): Reads CSV data as sequences.csv.DictReader(): Reads CSV data as dictionaries, using the header row as keys.