Created
January 14, 2010 10:13
-
-
Save russelnickson/277032 to your computer and use it in GitHub Desktop.
Count lines
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
| import sys | |
| from string import split | |
| f=open(sys.argv[1]) | |
| content=f.read() | |
| print content | |
| print 'the no.of lines in file = '+ str(len(split(content,'\n'))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment