Files
advent-of-code/2015/day1/p1/main.py
T
2024-12-02 09:58:35 -06:00

12 lines
229 B
Python

with open('../input.text', 'r') as file:
data = file.read()
floor = 0
for char in data:
if char == '(':
floor += 1
elif char == ')':
floor -= 1
print(f'The instructions took Santa to floor {floor}')