Skip to content

Instantly share code, notes, and snippets.

@arihantraj
Created December 4, 2009 17:40
Show Gist options
  • Save arihantraj/249188 to your computer and use it in GitHub Desktop.
Save arihantraj/249188 to your computer and use it in GitHub Desktop.
#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