For a text file just iterating over it with a for loop is almost always the way to go. Never mind about speed, it is the cleanest. In some versions of python readline() really does just read a single line while the for loop reads large chunks and splits t