From 8b2de23eaa431c7d640b73e34cbaa6da66c27da6 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 12 Dec 2021 07:01:36 +0100 Subject: Remove 1 line of code --- 2021/12/puzzles.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to '2021/12') diff --git a/2021/12/puzzles.py b/2021/12/puzzles.py index a395f5c..ede75db 100644 --- a/2021/12/puzzles.py +++ b/2021/12/puzzles.py @@ -16,9 +16,8 @@ def solve(paths: defaultdict[str, list[str]], path: str, flag: bool = False) -> # END PART 1 START PART 2 elif dest != "start": if dest.islower() and dest in tokens: - if flag: - continue - acc += solve(paths, f"{path},{dest}", True) + if not flag: + acc += solve(paths, f"{path},{dest}", True) else: acc += solve(paths, f"{path},{dest}", flag) # END PART 2 -- cgit v1.2.3