with open('foo.csv', 'wb') as f:
    writer = csv.writer(f)
for i in range(0, 100, 10):
    writer.writerow(list(range(i, i + 10)))
with open('foo.csv', 'r') as f:
    f.read()
Python - get column iterator from a file (without reading the whole file)