On 9/5/07, planetmatt <[EMAIL PROTECTED]> wrote: > > I am a Python beginner. I am trying to loop through a CSV file which > I can do. What I want to change though is for the loop to start at > row 2 in the file thus excluding column headers. > > At present I am using this statement to initiate a loop though the > records: > > for line in f.readlines(): > > How do I start this at row 2? >
you can simply call (and maybe throw away) f.readline() a single time before looping. If the lenght of the first line is fixed, you can also use f.seek to start reading from the second row. francesco
-- http://mail.python.org/mailman/listinfo/python-list