Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

count lines in file python

num_lines = sum(1 for line in open('myfile.txt'))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #count #lines #file #python
ADD COMMENT
Topic
Name
1+2 =