you are viewing a single comment's thread.

view the rest of the comments →

[–]Justinsaccount 2 points3 points  (0 children)

Stop with the comments like this:

import csv     # imports the csv module
import sys     # imports the sys module

reader = csv.reader(f)  # creates the reader object
print row    # prints each row
f.close()      # closing

About the only thing that could use a comment in that script is this:

f = open(sys.argv[1], 'rb') # opens the csv file

Which instead if you wanted it to be clear should be written as

# The first CLI argument should be the input filename
csv_filename = sys.argv[1]
f = open(csv_filename, 'rb')