Write CSV File in Python
Write CSV File is about tabular files. csv is in the stdlib. Excel usually needs openpyxl or pandas. Always with open(...) so the file closes.
For Write CSV File read: csv.reader or DictReader (column names). Write: writer / DictWriter. Don’t load a 2 GB file into memory if you can stream rows.
Write CSV File on the board — one row name,marks → Asha,90. Print it back. Same idea for Excel cells.
Write CSV File in Python — output — name,marks then Asha,90. Same writer as open("a.csv","w").
with open(...) as f
│ read / write
▼
auto closestdlib csv vs Excel library. One sentence + tiny row example.