summaryrefslogtreecommitdiffstats
path: root/20/py
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-12-10 09:22:30 +0100
committerGustav Sörnäs <gustav@sornas.net>2020-12-10 09:23:10 +0100
commitabf063fc5f113bd5fbf5ba2c4e8bf8ea591f57c1 (patch)
tree47f9fe4d97d7c63dd6a7faca5d274b845dbc30e5 /20/py
parent9f1080e091423531fab21ec0224368622580e92a (diff)
downloadaoc-abf063fc5f113bd5fbf5ba2c4e8bf8ea591f57c1.tar.gz
correct ans day 8
Diffstat (limited to '20/py')
-rw-r--r--20/py/d08.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/20/py/d08.py b/20/py/d08.py
index dd9535a..e825e89 100644
--- a/20/py/d08.py
+++ b/20/py/d08.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import aoc20
import sys
+from copy import deepcopy
def parse(prog):
@@ -33,7 +34,7 @@ def pt1(_in):
def pt2(_in):
_in = parse(_in)
for i in range(len(_in)):
- prog = _in.copy()
+ prog = deepcopy(_in)
inst, offset = prog[i]
if inst == "jmp":
prog[i][0] = "nop"