From 754bf75bd3b075c175284313454d1cd6cef85f51 Mon Sep 17 00:00:00 2001 From: Joscha Date: Sun, 2 Dec 2018 22:38:33 +0000 Subject: [PATCH] Standardize output --- 01/solve.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/01/solve.py b/01/solve.py index bf8756d..6911702 100644 --- a/01/solve.py +++ b/01/solve.py @@ -10,6 +10,8 @@ def load_freqs(filename): freqs.append(n) return freqs +# PART 2 + def find_repeat(freqs): total = 0 found = {total} @@ -24,11 +26,9 @@ def find_repeat(freqs): def main(filename): freqs = load_freqs(filename) - print(" Part 1") - print(f"Total: {sum(freqs)}") - print() - print(" Part 2") - print(f"First repeat: {find_repeat(freqs)}") + print(f"Solutions for {filename}") + print(f"Part 1: {sum(freqs)}") + print(f"Part 2: {find_repeat(freqs)}") if __name__ == "__main__": for filename in sys.argv[1:]: