readline skips on line

Soundwave maybe at lucky.com
Tue Apr 11 03:56:18 EDT 2000


I got a part of a programm looking like this

f=open('test.txt', 'r')
while f.readline()!='':
    print f.readline()
print 'ready'

but when it is runned, it wil print out the lines in the text file, but it
skips all the the odd line, it only displays line 2,4,6,8,10 and further

How can I solve this problem ?





More information about the Python-list mailing list