Python Write List to CSV: Header, Rows and Columns
Save Python lists as a CSV file with the built-in csv module: a header row, list of lists, one column, dicts, no blank lines, appending, and Excel-friendly files.
// notes/
Coding tips and build notes by Mahir Faysal, a student web developer in Bangladesh: tested Python, HTML, CSS, JavaScript and PHP tutorials, plus notes from my Next.js and Gemini projects. Sample posts are marked and drafts stay in the admin area.
Save Python lists as a CSV file with the built-in csv module: a header row, list of lists, one column, dicts, no blank lines, appending, and Excel-friendly files.
Save a Python dict as a readable JSON file with json.dump(indent=4), keep £ and é as they are, handle datetimes, overwrite safely and append the right way.
// filter
This view is only the category, tag, or search you asked for. Sample warnings still apply on any article that carries them. Drafts are still hidden. The full list is the learning notes page, which also explains how a note is written and why some posts are marked Sample.