Skip to content
Snippets Groups Projects
Commit a0e846d4 authored by Pat Prochacki's avatar Pat Prochacki
Browse files

Update file letters.py

parent 14a8998c
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ def file2prob(filename):
letter_dict = { c: 0 for c in letters }
letter_total = 0
with open(filename) as fp:
with open(filename, encoding="utf-8") as fp:
for c in fp.read():
if c.lower() not in letter_dict:
continue
......@@ -30,7 +30,7 @@ def file2pairs(filename):
letter_dict = { c: { a: 0 for a in letters }
for c in letters }
previous = None
with open(filename) as fp:
with open(filename, encdoing="utf-8") as fp:
for c in fp.read():
if c not in letter_dict:
continue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment