diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2021-12-15 22:27:25 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2021-12-16 01:33:43 +0000 |
commit | e22d2d2e3e1d1427caeeb3f106680bc3edceb39f (patch) | |
tree | b1b977a2178d11c35cf4125648476bdbbee7c14b /5.py | |
parent | 1d03c102f813f819697ea95f96eee6dbe0464be1 (diff) | |
download | aoc2021-e22d2d2e3e1d1427caeeb3f106680bc3edceb39f.tar.gz aoc2021-e22d2d2e3e1d1427caeeb3f106680bc3edceb39f.tar.xz aoc2021-e22d2d2e3e1d1427caeeb3f106680bc3edceb39f.zip |
utils: Point2D and related functions
Diffstat (limited to '5.py')
-rw-r--r-- | 5.py | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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') |