Reader
The CSV format it's just a text file with
comma-separated values.

import csv, pathlib
DIR = pathlib.Path(__file__).resolve().parent
with open(DIR / 'data/file1.csv') as file:
reader = csv.reader(file)
data = list(reader)
assert data[0][0] == '11'
assert data[0][1] == '12'
with open(DIR / 'data/file1.csv') as file:
reader = csv.reader(file)
for row in reader:
print(row)
Writer
Wth
writer object you can write data to a CSV file.

import csv, pathlib
DIR = pathlib.Path(__file__).resolve().parent
with open(DIR / 'data/file2.csv', 'w', newline='') as file:
writer = csv.writer(file)
writer.writerow([11, 12, 13])
writer.writerow([21, 22, 23])
writer.writerow([31, 32, 33])
with open(DIR / 'data/file2.csv') as file:
reader = csv.reader(file)
data = list(reader)
assert data[1][1] == '22'
assert data[2][2] == '33'
Dictionary
For CSV files that contain
header you can use dictionary.

import csv, pathlib
from typing import AnyStr
DIR = pathlib.Path(__file__).resolve().parent
with open(DIR / 'data/fileH1.csv') as file:
dr = csv.DictReader(file)
for row in dr:
print(row['A'], row['B'], row['C'])
with open(DIR / 'data/fileH2.csv', 'w', newline='') as file:
dw = csv.DictWriter(file, ['A', 'B', 'C'])
dw.writeheader()
dw.writerow({'A':11, 'B':12, 'C':13})
dw.writerow({'A':21, 'B':22, 'C':23})
dw.writerow({'A':31, 'B':32, 'C':33})
A = []
with open(DIR / 'data/fileH2.csv') as file:
dr = csv.DictReader(file)
for row in dr:
A.append(row['A'])
print(A)