Cleanup day 2 solution

This commit is contained in:
Nettika
2023-12-16 16:02:06 -08:00
parent 72e301c988
commit 89af752a98
5 changed files with 238 additions and 14 deletions

View File

@@ -1,5 +1,6 @@
import re
"Day 1: Trebuchet?!"
import re
number_word_map = {
"one": "1",
@@ -61,7 +62,7 @@ def _recover_all_calibration_values(
)
def recover_calibration_digits_only(input: str) -> str:
def solve_part_1(input: str) -> str:
return str(
_recover_all_calibration_values(
input,
@@ -72,7 +73,7 @@ def recover_calibration_digits_only(input: str) -> str:
)
def recover_calibration_digits_and_words(input: str) -> str:
def solve_part_2(input: str) -> str:
return str(
_recover_all_calibration_values(
input,