Advent of Code 2015 Day 01 Part 1Part 2 1 2 3 4 5 6 7 8 9 10 11with open("day01_input.txt", "r") as f: s = f.read() floor = 0 for c in s: if c == "(": floor += 1 elif c == ")": floor -= 1 print(floor) 1 2 3 4 5 6 7 8 9 10 11 12 13 14with open("day01_input.txt", "r") as f: s = f.read() floor = 0 for i in range(len(s)): c = s[i] if c == "(": floor += 1 elif c == ")": floor -= 1 if floor == -1: break print(i + 1)