DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
6+8 =
Submit