Homework Solution

Input, Output and Files

with open('states.csv') as raw:
    states = []
    for line in raw:
        pieces = line.strip().split(',')
        states.append( (pieces[0], [int(p) for p in pieces[1:]]) )

Last modified: Tuesday, 23 October 2018