From 4e8696a16e932257800a55eda5037fa62a75e995 Mon Sep 17 00:00:00 2001 From: daviddoji Date: Tue, 8 Mar 2022 21:16:30 +0100 Subject: [PATCH] Solution to problem 6 part 1 in Python --- src/Year_2019/P6.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Year_2019/P6.py b/src/Year_2019/P6.py index 70d1784..2dc12fd 100644 --- a/src/Year_2019/P6.py +++ b/src/Year_2019/P6.py @@ -68,12 +68,12 @@ # What is the total number of direct and indirect orbits in your map data? -with open("files/P6.txt") as f: - orbits = [line for line in f.read().strip().split()] - from collections import defaultdict +with open("files/P6.txt") as f: + orbits = [line for line in f.read().strip().split()] + def count_orbits(universe, node, counter, total_sum): total_sum += counter