2020 day 19 and day 20 part 1

This commit is contained in:
2024-09-30 20:04:33 -04:00
parent 36f20610ae
commit 97b05614ee
4 changed files with 305 additions and 1 deletions

3
lib.py
View File

@@ -202,6 +202,9 @@ def str_to_ints(line: str) -> list[int]:
return list(map(int, r.findall(line)))
ints = str_to_ints
def str_to_lines_no_empty(text: str) -> list[str]:
return list(filter(lambda l: l.strip() != "", text.splitlines()))