From e11577db2b9af3451a727353bb9e928f614774b2 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 12 Dec 2021 01:41:54 +0100 Subject: Use a map --- 2021/08/puzzle-2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '2021/08') diff --git a/2021/08/puzzle-2.py b/2021/08/puzzle-2.py index c90e07c..85854f9 100755 --- a/2021/08/puzzle-2.py +++ b/2021/08/puzzle-2.py @@ -44,7 +44,7 @@ def solve(nums: list[str]) -> int: def main() -> None: with open("input", "r", encoding="utf-8") as f: - print(sum(solve(line) for line in map(lambda l: l.strip().split(), f.readlines()))) + print(sum(map(solve, map(lambda l: l.strip().split(), f.readlines())))) if __name__ == "__main__": -- cgit v1.2.3