Skip to content

Instantly share code, notes, and snippets.

View sslaia's full-sized avatar

Sirus Laia sslaia

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