Possible Duplicate:
How to get line count cheaply in Python?
a want to find total lines in a text file using python, an easy solution is to iterate over lines using `open('file.txt') and count them.
can anybody introduce me a better solution?
Possible Duplicate:
How to get line count cheaply in Python?
a want to find total lines in a text file using python, an easy solution is to iterate over lines using `open('file.txt') and count them.
can anybody introduce me a better solution?