Those are my solution codes for Advent of Code, written in Python.
Usually, I create a method solve(content: str)
which takes the input as parameter, and returns the solution
to both parts. When the 2 parts have very different solutions, I create 2 methods part1(content: str)
and
part2(content: str)
, which return the solution for their respective part.
I set a variable named test_content
with the example input, directly in the Python file.
For most days to work, you must put your own real input in a file named <2_digit_day>.txt
(e.g 01.txt
, 23.txt
),
next to the Python file itself.
I added my solutions for various other challenges as well, most notably those available (in French) at https://www.isograd-testingservices.com/FR/solutions-challenges-de-code.