diff options
author | Thomas Voss <thomasvoss@live.com> | 2021-12-08 07:15:44 +0100 |
---|---|---|
committer | Thomas Voss <thomasvoss@live.com> | 2021-12-08 07:15:44 +0100 |
commit | 239e1ac49ccf55e38a5f14f2a7a7cc59f6e146d5 (patch) | |
tree | bafd1804270ae09c371aa626066330237f4d8292 /2021/08 | |
parent | cc86bc72ff7c1625dd9e05027f6c7a740604237b (diff) |
Remove useless constructors
Diffstat (limited to '2021/08')
-rwxr-xr-x | 2021/08/puzzle-2.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/2021/08/puzzle-2.py b/2021/08/puzzle-2.py index 010258f..74d2aad 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(set(s).union(set(nummap[1]))): + elif set(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(set(s)): + if not set(nummap[1]).issubset(s): nummap[6] = s # 4 is a subset of 9 but not 0 - elif set(nummap[4]).issubset(set(s)): + elif set(nummap[4]).issubset(s): nummap[9] = s else: nummap[0] = s |