469,935 Members | 1,612 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,935 developers. It's quick & easy.

readln() until EOF

a = open("Thefile.txt","r")

while ?????:
result = a.readln()

what do i put in ???? if i want to keep reading line by line until i
reach the end of the file?

I don't want to break the loop if there is a blank line, because there
will be.

Ex. of a file:


result 2


Jul 24 '08 #1
0 749

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Thomas Nelson | last post: by
reply views Thread by Thomas Nelson | last post: by
10 posts views Thread by sophie_newbie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.