how to count lines in a file ?

Fredrik Lundh fredrik at pythonware.com
Wed Jul 24 14:20:13 EDT 2002


"Shagshag13" wrote:

> so using it like i use it, is ok ? (even if it's over complicated).

sure.

on my machine, the readlines version is actually about 15%
faster, given a large enough file.  ymmv, as usual.

</F>





More information about the Python-list mailing list