Reading CSV Files to lists
Reading CSV Files into Python lists
- Looping through the entire list of rows in the file and doing something for each row.
- Finding the highest, lowest and average for items in CSV rows.
Reading CSV files to Dictionaries
Reading CSV Files into Python Dictionaries
- Where you just want find information about a specific item in a CSV file.
Writing to CSV Files
import csv f = open('namesages.csv','a',newline = '') name = input("What is your name?") age = input("What is your age?") row = (name,age) writer = csv.writer(f) writer.writerow(row) f.close() #really important!!!