Created
December 4, 2009 17:40
-
-
Save arihantraj/249188 to your computer and use it in GitHub Desktop.
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
#This is the code for the question in the page | |
#http://pylearn.pbworks.com/Count-Lines | |
import sys | |
doc = open(sys.argv[1],'r') | |
count = 0 | |
for line in doc: | |
count += 1 | |
print "the number of lines are: ",count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment