๐ Data Formats & Networking
CSV Files
Read and write tabular data with the csv module.
csv.reader yields each row as a list; csv.DictReader gives dicts keyed by the header row.
import csv, io
text = "name,score\nAda,92\nLinus,87"
reader = csv.DictReader(io.StringIO(text))
for row in reader:
print(row["name"], row["score"])