On May 25, 12:49 pm, cjl <cjl... at gmail.com> wrote: > P: > > Stupid question: > > reader = csv.reader(open('somefile.csv')) > for row in reader: > do something > > Any way to determine the "length" of the reader (the number of rows) > before iterating through the rows? > > -CJL How about: f = open("somefile.csv") numlines = len(f.readlines())