summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2019-12-21 20:33:00 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2019-12-21 20:34:37 +0100
commit71c2f3bb9d2899e2e4e1c0ecfc667b413501ed34 (patch)
treeb9036706198287e117f3b34d5b48feadb07ed08d
parent92b857d5954c15afdc581375aedcd16feea19b67 (diff)
downloadaoc-71c2f3bb9d2899e2e4e1c0ecfc667b413501ed34.tar.gz
Fix returns
-rw-r--r--19/py/d21.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/19/py/d21.py b/19/py/d21.py
index 84f01ff..03ba4fc 100644
--- a/19/py/d21.py
+++ b/19/py/d21.py
@@ -2,14 +2,15 @@ import intcode
def ascii_draw(a):
s = ""
+ post = ""
for c in a:
if c == 10:
s += "\n"
elif c < 128:
s += chr(c)
else:
- print("[INVALID ASCII]", c)
- return s
+ post = "[INVALID ASCII]: " + str(c)
+ return s + ("\n" if post != "" else "") + post
def do(c, jumpscript):
output = []