From e22d2d2e3e1d1427caeeb3f106680bc3edceb39f Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Wed, 15 Dec 2021 22:27:25 +0000 Subject: utils: Point2D and related functions --- 5.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to '5.py') diff --git a/5.py b/5.py index 1e61efb..802ccc7 100644 --- a/5.py +++ b/5.py @@ -1,11 +1,9 @@ from collections import defaultdict, namedtuple -from utils import open_day - -Pos = namedtuple('Pos', ['x', 'y']) +from utils import open_day, Point2D vents = [ tuple( - Pos(*map(int, h.split(','))) + Point2D(*map(int, h.split(','))) for h in l.rstrip().split(' -> ') ) for l in open_day(5).read().rstrip().split('\n') -- cgit v1.2.3-54-g00ecf