Skip to content

Instantly share code, notes, and snippets.

@arihantraj
Created December 4, 2009 17:17
Show Gist options
  • Save arihantraj/249175 to your computer and use it in GitHub Desktop.
Save arihantraj/249175 to your computer and use it in GitHub Desktop.
#This is the code for the question in the page
#http://pylearn.pbworks.com/Count-Sentences
import sys
doc = open(sys.argv[1],'r')
text = doc.read()
linesplit = text.split('.')
print "the number of sentences are:",len(linesplit)-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment