Skip to content

Instantly share code, notes, and snippets.

@underhilllabs
Created June 11, 2010 18:39
Show Gist options
  • Save underhilllabs/434872 to your computer and use it in GitHub Desktop.
Save underhilllabs/434872 to your computer and use it in GitHub Desktop.
'''
fricks.py
count the numbers of fucks in a text file
'''
fucks=0
for line in open('Sprawl - 01 Neuromancer - William Gibson.txt'):
if "fuck" in line:
fucks+=1
print line
else:
print("total fucks %d" % fucks)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment