Learn how to solve CodeCrafters challenges in Python
python3
installed. Our test runners use version 3.12
(as of April 2024).
The script for your challenge (like ./spawn_redis_server.sh
) will run your code using this version of the Python interpreter. It looks something like this:
app/
directory.app/main.py
contains the main
function, which is what the test runner executes.app/
. The test runner will include them when compiling your code.
For example, if you added a file at app/foo.py
, you could use it like so:
pip
pipenv
For example, to add the requests
library, you can run the following command:
Pipfile
:
Pipfile.lock
.