|
123456789101112131415161718 |
- class Helper:
- def __init__(self, debug=True):
- self.DEBUG = debug
-
- def debug(self, message, *args, **kwargs):
- if self.DEBUG:
- print(message, *args, **kwargs)
-
- @staticmethod
- def load_input(day):
- try:
- day = str(day) if day >= 10 else f"0{day}"
- except (ValueError, TypeError):
- pass
- filename = f"day{day}.input"
- with open(filename, "r") as file:
- input_list = [line.strip() for line in file.readlines()]
- return input_list
|