From 15a9c968c803ca5e61b5e59005791123ee2db957 Mon Sep 17 00:00:00 2001 From: Nicolas Green Date: Wed, 4 Dec 2024 00:02:57 -0500 Subject: [PATCH] Fix redundant parentheses in conditional statement Remove unnecessary parentheses in a conditional to improve code readability. The logic of the program remains unchanged, ensuring safe counting works as intended. --- day2/part1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/day2/part1.py b/day2/part1.py index e86c18c..86da01a 100644 --- a/day2/part1.py +++ b/day2/part1.py @@ -28,7 +28,7 @@ with open("part1_input.txt", "r") as file_input: # decrease if we're supposed to be increasing or vice versa elif increasing and (-4 < difference < 0): safe_count += 1 - elif not (increasing) and (0 < difference < 4): + elif not increasing and (0 < difference < 4): safe_count += 1 else: break