diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2019-12-21 20:33:00 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2019-12-21 20:34:37 +0100 |
| commit | 71c2f3bb9d2899e2e4e1c0ecfc667b413501ed34 (patch) | |
| tree | b9036706198287e117f3b34d5b48feadb07ed08d | |
| parent | 92b857d5954c15afdc581375aedcd16feea19b67 (diff) | |
| download | aoc-71c2f3bb9d2899e2e4e1c0ecfc667b413501ed34.tar.gz | |
Fix returns
| -rw-r--r-- | 19/py/d21.py | 5 |
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 = [] |
