Learn Python by fixing code with engaging exercises from basic to advanced levels.
Project details
PyLings offers a unique approach to mastering Python through practical exercises that simulate real-world coding challenges. With a series of warm-ups and interview questions grouped by difficulty, users can progressively enhance their skills in a structured environment, making it ideal for both beginners and experienced developers preparing for interviews.
PyLings 🐍
Enhance Python programming skills through targeted practice with PyLings. This repository offers a unique, rustlings-style approach for preparing for Python interviews. With 35 warm-ups and 20 interview-focused exercises, users can progress from fundamental tasks to complex scenarios, all using Python 3.14 without any external dependencies.
Launching the project is straightforward:
python3 -m pylings
Each time code is saved, the next exercise is displayed with tests automatically rerun, enabling continuous learning. The controls are intuitive:
n: Next exerciseh: Hint for assistancer: Re-run testsl: List available tasksc: Check all testsx: Reset the current exercises: View solutionq: Quit the sessionSolutions are conveniently organized in a corresponding structure within the solutions/ directory. A separate questions/middle.md and questions/senior.md document interview questions relevant to the different exercise levels.
For users who prefer basic testing without the PyLings interface, a traditional unit test execution command is also provided:
python3 -m unittest discover -s tests -p "test_ex05*" -v
Reference solutions can be explored by setting an environment variable to check accuracy:
SOLUTIONS=1 python3 -m unittest discover -s tests
Dive into PyLings to strengthen Python proficiency and prepare for interview success.
Comments
0Start the conversation
Share the first comment.