Created
November 26, 2017 12:01
-
-
Save iossefy/ed7bcda6c49d8a00298c86232f812bf2 to your computer and use it in GitHub Desktop.
Count how many line in a txt file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num_lines = sum(1 for line in open('myfile.txt')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment