From a4cd297a80d7ed1ab67256f4cc9d3c84cc3b76cd Mon Sep 17 00:00:00 2001 From: Kento Nozawa Date: Sat, 18 Dec 2021 23:12:15 +0900 Subject: [PATCH] replace word with w in the original code --- decoupled.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/decoupled.md b/decoupled.md index 3630147..bf1fda5 100644 --- a/decoupled.md +++ b/decoupled.md @@ -239,9 +239,9 @@ def count_words_in_file(in_file, out_file): for w in W: if w != '': if w in counts: - counts[word] += 1 + counts[w] += 1 else: - counts[word] = 0 + counts[w] = 0 with open(out_file, 'w') as f: for k in counts.keys(): @@ -427,9 +427,9 @@ def count_words_in_file(in_file, out_file): for w in W: if w != '': if w in counts: - counts[word] += 1 + counts[w] += 1 else: - counts[word] = 0 + counts[w] = 0 with open(out_file, 'w') as f: for k in counts.keys():