This project has been created as part of the 42 curriculum by yaqliu.
Practice repository for Python fundamentals, organized as progressive modules and exercises.
This repository currently includes modules module00 through module10.
module00tomodule02: Python basics, functions, and exceptionsmodule03tomodule05: data processing, I/O, and pipeline-style exercisesmodule06tomodule07: packages, imports, and OOP design patternsmodule08tomodule10: advanced scripting topics and continuation modules
Most exercises are small standalone scripts. Some modules also include helper files, datasets, or archives used by the exercises.
py_piscine/
βββ module00/
β βββ ex0/ ... ex7/
β βββ ft_garden_summary.py
βββ module01/
β βββ ex0/ ... ex6/
βββ module02/
β βββ ex0/ ... ex5/
βββ module03/
β βββ ex0/ ... ex6/
β βββ data_generator.py
β βββ helper scripts and archives
βββ module04/
β βββ ex0/ ... ex4/
β βββ sample_data.json
β βββ text/archive assets
βββ module05/
β βββ ex0/ ... ex2/
β βββ main.py
βββ module06/
β βββ alchemy/
β βββ import/package exercises
βββ module07/
β βββ ex0/ ... ex4/
β βββ tools/
β βββ card-game themed OOP exercises
βββ module08/
β βββ ex0/ ... ex2/
βββ module09/
β βββ ex0/ ... ex2/
βββ module10/
β βββ ex0/ ... ex4/
βββ README.md
- basic syntax, variables, expressions
- functions, conditionals, loops, recursion
- clean function design
- typing, docstrings, and introductory OOP
- exception handling patterns
- custom errors and defensive coding
- data structures and transformations
- analytics-style scripting
- file reading/writing
- stream and archive handling
- multi-step processing pipelines
- composable data flow
- package structure and imports
- module boundaries and dependency hygiene
- OOP architecture and interfaces
- inheritance/composition in a card-game domain
- advanced scripting and Python concepts
- continuation exercises by topic
- Python 3.10+ recommended
- no external dependencies for most modules
Some exercises include their own local dependency files (for example, module08/ex1/requirements.txt). Install those only when needed for that specific exercise.
Run scripts from the repository root:
python3 module00/ex0/ft_hello_garden.py
python3 module01/ex0/ft_garden_intro.py
python3 module02/ex0/ft_first_exception.py
python3 module03/ex0/ft_command_quest.py
python3 module04/ex0/ft_ancient_text.py
python3 module05/ex0/stream_processor.py
python3 module06/ft_circular_curse.py
python3 module07/ex0/main.py
python3 module08/ex0/construct.py
python3 module09/ex0/space_station.py
python3 module10/ex0/lambda_spells.py- Complete modules in order (
module00->module10). - Finish each
ex*before moving on. - Run the script after every change.
- Keep filenames unchanged to match exercise expectations.
- Refactor only after behavior is correct.
- Some modules include extra assets (
.txt,.json,.tar.gz) used by exercises. - In
module07+, several exercises are class-based and usemain.pyentry points. - If a script imports sibling files, run it from the repo root so relative paths remain stable.
This repository is for educational and personal learning purposes.
Please do not use this project for paid redistribution or resale.
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0). See LICENSE.