May-24-2018, 06:39 PM
(May-24-2018, 03:53 PM)oldcity Wrote:for line in file: pdate,catg,amt,howp = line.split(",") catg = int(catg) tamt = tamt + float(amt) x = x + 1 print 'cnt > ',x ,'catg :', catg
That's your entire file processing. If you want to do more with each line, then whatever processing you're trying to do to each line, should be within the
for
block.