Hi all,
I just read the manual and got to know I can use a for loop to iterate
through the lines in the file.

But so far, I was strugling with the following:

import os
file = open('File1.txt','r')
line = file.readline()
while line !=' ':
    print line
    line = file.readline()

As mentioned in the docs, the EOF returns an empty string. I am unable
to catch or match against the EOF. Please help me in pointing out as
where I am making the mistake.


-- 
Senthil
http://phoe6.livejournal.com

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to