Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@idoushiki
Created August 28, 2018 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save idoushiki/bd70824c7687abf1198de822bcd05809 to your computer and use it in GitHub Desktop.
Save idoushiki/bd70824c7687abf1198de822bcd05809 to your computer and use it in GitHub Desktop.
fp=open("words.txt","r")
msg = fp.read().lower()
counter = {}
for c in msg:
if not c in counter:
counter[c] = 1
else:
counter[c] += 1
print(counter)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment