[Tutor] Newbie simple question
Jay Loden
python at jayloden.com
Sat Feb 26 04:37:44 CET 2005
You want readlines() not readline() and it should work something like this:
remailfile = open("remail2.txt", r)
remails = remailfile.readlines()
for line in remails:
#do something
-Jay
On Friday 25 February 2005 05:14 pm, Valone, Toren W. wrote:
> I need to know how to read the next line while in the "for line in" loop.
> Readline does not read the next line (I watched it in debug) I think it has
> something to do with the for line loop but I have not found any
> documentation in the doc's or tutor for any functions for line..
>
> Thanks, please forgive the sloppy code.
More information about the Tutor
mailing list