def count_word(word):
result = 0
stop_world = [word, word + '.', word + '".', word + ',']
save_file = open('output.txt', "r+")
for word in save_file.read().split():
if word in stop_world:
result += 1
return result
Подскажите вместо этого:
stop_world = [word, word + '.', word + '".', word + ',']