1
0

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.
This commit is contained in:
Nicolas Green 2024-12-04 00:02:57 -05:00
parent 4a405ba095
commit 15a9c968c8
No known key found for this signature in database

View File

@ -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