Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

python how to count the lines in a file

# Basic syntax:
count = len(open('/path/to/the/file.ext').readlines())
Source by www.oreilly.com #
 
PREVIOUS NEXT
Tagged: #python #count #lines #file
ADD COMMENT
Topic
Name
1+3 =