This repository holds the code for the Real Python Advent of Code: Solving Your Puzzles With Python tutorial.
Pytest is used for testing. You should first create a virtual environment:
$ python -m venv venv
$ source venv/bin/activate
You can then install pytest
with pip
:
(venv) $ python -m pip install pytest
The aoc_grid.py example uses Colorama and NumPy. To run that example, you should also install those packages into your environment:
(venv) $ python -m pip install colorama numpy
The puzzle solutions only use Python's standard library. Note that the solution to Day 5, 2021 uses structural pattern matching which is only available in Python 3.10 and later.
- Geir Arne Hjelle, E-mail: geirarne@realpython.com
Distributed under the MIT license. See LICENSE
for more information.