Files
advent-of-code-2024/aoclib/aoclib.py
Dmitry Fedotov 45e741d2fa add day 3
2024-12-07 18:17:36 +03:00

15 lines
363 B
Python

class Input(object):
def __init__(self, filename):
with open(filename, 'r') as f:
self._raw = f.read()
def raw(self):
return self._raw
def lines(self):
return [l.strip() for l in self._raw.strip().split('\n')]
def lines_as_int_lists(self):
return [[int(n) for n in l.split()] for l in self.lines()]