f = open('Walden.txt','r')
lines = f.readlines()
b = open('Walden.txt','r').read()
type(b)
str
b=b.replace(",","")
b=b.replace(".","")
b=b.replace("?","")
b=b.replace("!","")
b=b.replace("'","")
b=b.replace("’","")
b=b.replace("”“","")
b = b.split()
from collections import Counter
Walden = b
Counter(Walden)