Qilong Ren wrote: > Hi, Shane, > > Thanks for fast reply. > > What I used is : > for line in open(FILE): > <do stuff> > I don't want to store all lines in a list because sometimes the file is very > large. We need to store the value of the previous line in a variable. Is that > right?
Almost. Strictly, we need to bind a name to the object holding the previous value, so we can refer to that object later. :) -- http://mail.python.org/mailman/listinfo/python-list