From 425d6ee740e5f76fd8f3945e9b1e6a7b07f16318 Mon Sep 17 00:00:00 2001 From: Sebastian Seedorf Date: Mon, 14 Dec 2020 10:04:07 +0100 Subject: [PATCH] Day 14 (removed unnecessary string join) --- day14/part2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/day14/part2.py b/day14/part2.py index 3e0ee49..415ba16 100644 --- a/day14/part2.py +++ b/day14/part2.py @@ -27,7 +27,7 @@ for line in lines: match = regex_mem.match(line) addr, dec = list(map(int, match.groups())) bin = format(addr, '036b') - res = "".join((a if b == '0' else b) for a, b in zip(bin, mask)) + res = [(a if b == '0' else b) for a, b in zip(bin, mask)] for x in combination(res): mem[x] = dec