Skip to content

Instantly share code, notes, and snippets.

Avatar

Sirus Laia sslaia

View GitHub Profile
@fdb
fdb / count_words.py
Created Mar 7, 2018
Counting Words with Python 3
View count_words.py
import csv
import string
translator = str.maketrans('', '', string.punctuation)
word_count = {}
text = open('declaration.txt').read()
words = text.split()
for word in words: