From 4ca2292ce455acb844d19b279e500db4ebdc4c41 Mon Sep 17 00:00:00 2001 From: Emile Date: Sun, 19 Feb 2023 14:10:33 +0100 Subject: oops, double nested --- solve.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'solve.py') diff --git a/solve.py b/solve.py index 06daab1..6b18f81 100644 --- a/solve.py +++ b/solve.py @@ -664,14 +664,12 @@ while True: with open('cache.pickle', 'wb') as handle: pickle.dump(cache, handle, protocol=pickle.HIGHEST_PROTOCOL) + cache_human_readable = open("cache.md", "w") + cache_human_readable.write(f"# cache\n```\n") for k in cache: - - cache_human_readable = open("cache.md", "w") - cache_human_readable.write(f"# cache\n```\n") - for k in cache: - cache_human_readable.write(f"{k}: {cache[k]}\n") - print(k) - cache_human_readable.write(f"```") + cache_human_readable.write(f"{k}: {cache[k]}\n") + print(k) + cache_human_readable.write(f"```") break -- cgit 1.4.1