🌟 How to Write to a CSV File in Python

import csv

studentsdata= [["Jessica Wallens", 1987], ["Samantha Peters", 1988],
["Jessica Warren", 1990]]

with open ("Students.csv", "w", newline="") as file:
writedata= csv.writer(file)
writedata.writerows(studentsdata)


❇️ @raspberry_python

Comments

Be the first to add a comment