Skip to content

Instantly share code, notes, and snippets.

@okal
Created November 3, 2011 19:05
Show Gist options
  • Select an option

  • Save okal/1337471 to your computer and use it in GitHub Desktop.

Select an option

Save okal/1337471 to your computer and use it in GitHub Desktop.
A Python wordcounter.
#Inspired by http://www.daniweb.com/software-development/python/code/216495
def word_counter(text):
return len(text.split(None))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment