advent2022/eleven.py

11 lines
263 B
Python
Executable File

#!/usr/bin/env python3
from useful import *
def monkey(p):
ls = p.strip().split('\n')
op = ls[2].strip().split()[4]
return [op, *[numbers(l) for l in ls[1:3]], *[numbers(l)[0] for l in ls[3:]]]
ms = [monkey(p) for p in pgphs(open(0).read())]
ic(ms)