0

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?

Community
  • 1
  • 1
pylover
  • 7,670
  • 8
  • 51
  • 73

0 Answers0