from urllib.request import urlopen
from collections import Counter
import re
conn = urlopen('http://textfiles.com/100/dodontae.hum')
lines = conn.readlines()
conn.close()
# readlines() returns byte strings
data = ''.join([line.decode('utf-8') for line in lines])
# replace non-letters ...