aboutsummaryrefslogtreecommitdiff
path: root/2021/08/puzzle-2.py
diff options
context:
space:
mode:
authorThomas Voss <thomasvoss@live.com> 2021-12-08 07:44:13 +0100
committerThomas Voss <thomasvoss@live.com> 2021-12-08 07:44:13 +0100
commite7e3c391a13c96b1b0553078b784167eab06999e (patch)
tree86866ee4c4585e340471d118bc7b110dad67f236 /2021/08/puzzle-2.py
parentfe2fb0311160440fb4a2ba782984b1c92865f91d (diff)
Remove EVER MORE useless constructors
Diffstat (limited to '2021/08/puzzle-2.py')
-rwxr-xr-x2021/08/puzzle-2.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/2021/08/puzzle-2.py b/2021/08/puzzle-2.py
index 0ebb2d3..0139049 100755
--- a/2021/08/puzzle-2.py
+++ b/2021/08/puzzle-2.py
@@ -20,17 +20,17 @@ def solve(nums: list[str]) -> int:
if nummap[1].issubset(s):
nummap[3] = s
# 4 is a subset of 5 union with 1 but not 2 union with 1
- elif set(nummap[4]).issubset(s.union(nummap[1])):
+ elif nummap[4].issubset(s.union(nummap[1])):
nummap[5] = s
else:
nummap[2] = s
# 0, 6, or 9
case 6:
# 1 is a subset of 6 but not 0 or 9
- if not set(nummap[1]).issubset(s):
+ if not nummap[1].issubset(s):
nummap[6] = s
# 4 is a subset of 9 but not 0
- elif set(nummap[4]).issubset(s):
+ elif nummap[4].issubset(s):
nummap[9] = s
else:
nummap[0] = s