So far, I have this code (from cs50/pset6/DNA):
import csv data_dict = {} with open(argv[1]) as data_file: reader = csv.DictReader(data_file) for record
You can loop through a dictionary in python simply enough like this:
for key in dictionary: print(key, dictionary[key])