import re
def split_line(line):
return re.findall('+(?:\'+)?',line)
file = open(“dictionary.txt”)
dictionary_list =
for line in file:
line = line.strip()
dictionary_list.append(line)
file.close()
text = open(“AliceInWonderLand200.txt”)
for line in text:
line = line.strip()
split_line(line)
for word in line:
word = word.upper()
file.close()
P.S. Вот так нагляднее