Skip to content

Commit aaab842

Browse files
committed
fixed problem 23 from chapter 6
1 parent cff53ea commit aaab842

File tree

2 files changed

+327
-785
lines changed

2 files changed

+327
-785
lines changed

Chapter 6/problems/Problem6_23_corrigir.py renamed to Chapter 6/problems/Problem6_23.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ def scaryDict(filename):
22
file = open(filename)
33
content = file.read()
44
file.close()
5-
for symbol in '!?,;.-"()[]1234567890':
5+
for symbol in '!?,;.-"()[]1234567890_´`':
66
content = content.replace(symbol, '')
7+
content = content.replace("'", '')
8+
content = content.lower()
79
content = content.split()
810
for word in content:
911
if len(word) < 3:
1012
content.remove(word)
13+
1114
content = list(set(content))
1215
content.sort()
1316
newfile = ''

0 commit comments

Comments
 (0)