From fa259faa2b22d9126b191369ad65e6abcb4eda67 Mon Sep 17 00:00:00 2001 From: Isaac Shoebottom Date: Tue, 3 Dec 2024 14:58:13 -0400 Subject: [PATCH] Remove unneeded continue logic --- 2024/03/solution.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/2024/03/solution.py b/2024/03/solution.py index a5a11a9..e411095 100644 --- a/2024/03/solution.py +++ b/2024/03/solution.py @@ -19,10 +19,6 @@ for match in matches: dont_match = data.rfind("don't()", 0, start) if do_match == dont_match == -1: # Neither total += int(match.group(1)) * int(match.group(2)) - continue - if do_match > dont_match: # Do + elif do_match > dont_match: # Do total += int(match.group(1)) * int(match.group(2)) - continue - else: # Don't - continue print(total) \ No newline at end of file