10 parts = oursum.split()
14 for index,c in enumerate(part):
18 new_parts.append(part[index:])
22 for index,c in enumerate(part):
25 new_parts.append(part[0:index])
29 new_parts.append(part)
38 if in_brackets > 0 and part != ")" and part != "(":
39 bracketed.append(part)
41 if in_brackets > 0 and part == ")":
43 bracketed.append(part)
45 part=do_sum(bracketed[1:-1])
55 bracketed.append(part)
66 for line in [line.rstrip() for line in open(filename, "r")]:
67 answer=do_sum(parse_sum(line))
70 print("Part 1 Total:", total)