From 8c09ef29346b134fc198ece7a69443fd153fcf87 Mon Sep 17 00:00:00 2001 From: Lauri Jesmin Date: Wed, 6 Dec 2023 16:43:32 +0200 Subject: [PATCH] =?UTF-8?q?t=C3=B6=C3=B6tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 5/advent_2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/5/advent_2.py b/5/advent_2.py index a1cf842..7c23bb2 100755 --- a/5/advent_2.py +++ b/5/advent_2.py @@ -34,6 +34,7 @@ def getrangesource(range): def findmapping(sr, tables, prefix): print(f"{prefix}Rekursiooni järel {len(tables)}") print(f"{prefix}{sr}") + tables = tables.copy() allresults = [] if len(tables) == 0: print(f"{prefix}Tagasi, {sr.startpoint}") @@ -98,7 +99,7 @@ def findmapping(sr, tables, prefix): return min(allresults) -with open("data.txt") as file: +with open("data2.txt") as file: lines = [line.rstrip() for line in file] tables = []