diff options
author | Thomas Voss <thomasvoss@live.com> | 2021-12-08 15:31:29 +0100 |
---|---|---|
committer | Thomas Voss <thomasvoss@live.com> | 2021-12-08 15:31:29 +0100 |
commit | 0a082f129f9438fbfaf315ca3220e62586c878cd (patch) | |
tree | f601e857ac27ebc5de16e0e6b8a576076decbc8a /2020 | |
parent | 9f0962135d694d680030b806ff33095318dd00c4 (diff) |
Use the .readlines() method
Diffstat (limited to '2020')
-rwxr-xr-x | 2020/14/puzzle-1.py | 2 | ||||
-rwxr-xr-x | 2020/14/puzzle-2.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/2020/14/puzzle-1.py b/2020/14/puzzle-1.py index 81f9136..02e5d38 100755 --- a/2020/14/puzzle-1.py +++ b/2020/14/puzzle-1.py @@ -19,7 +19,7 @@ def bitmask(mask: str, num: int) -> int: def main() -> None: with open("input", "r", encoding="utf-8") as f: - lines = f.read().splitlines() + lines = f.readlines() mem: dict[str, int] = {} mask = "" diff --git a/2020/14/puzzle-2.py b/2020/14/puzzle-2.py index 726da0a..d346622 100755 --- a/2020/14/puzzle-2.py +++ b/2020/14/puzzle-2.py @@ -27,7 +27,7 @@ def bitmask(mask: str, num: int) -> tuple[int, ...]: def main() -> None: with open("input", "r", encoding="utf-8") as f: - lines = f.read().splitlines() + lines = f.readlines() mem: dict[str, int] = {} mask = "" |