"""Advent day 1, challenge 1 Count the number of times the input number is higher than the previous one """ first = False prev_depth = None n_increased = 0 with open("1_1_input.txt") as f: for line in f: depth = int(line) if (prev_depth is not None and depth > prev_depth): n_increased += 1 prev_depth = depth print(n_increased)