summaryrefslogtreecommitdiffstats
path: root/solutions/py/d04.py
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2019-12-17 18:53:31 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2019-12-17 18:53:31 +0100
commit189ca3de24bcaa5028767154af555c2194d019ab (patch)
tree26108eb513aa2bca52faf46ea71f359a508e7508 /solutions/py/d04.py
parentc03a47188746c5e5aea1600ba4fe5fb656d71d48 (diff)
downloadaoc-189ca3de24bcaa5028767154af555c2194d019ab.tar.gz
Remove python3.8-isms
Diffstat (limited to 'solutions/py/d04.py')
-rw-r--r--solutions/py/d04.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/solutions/py/d04.py b/solutions/py/d04.py
index 778b05e..c9bcbf3 100644
--- a/solutions/py/d04.py
+++ b/solutions/py/d04.py
@@ -25,7 +25,8 @@ def pt1(input):
amount = 0
n = 357253
while n < 892942 + 1:
- if (inc := isIncreasing(n))[0] == True:
+ inc = isIncreasing(n)
+ if inc[0] == True:
if containsDouble(n):
amount += 1
n += 1
@@ -46,7 +47,8 @@ def pt2(input):
amount = 0
n = 357253
while n < 892942 + 1:
- if (inc := isIncreasing(n))[0] == True:
+ inc = isIncreasing(n)
+ if inc[0] == True:
if containsDouble(n):
amount += 1
n += 1