Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
6+8 =