A polished, beginner-friendly Python handbook that teaches Python from zero to practical independent programming. Learn Python through structured chapters, hands-on exercises, and real-world mini projects.
This is a comprehensive, open-source learning resource for Python. It's not just a single document—it's a complete structured curriculum with:
- 23 handbook chapters covering Python fundamentals through practical intermediate topics
- 23 exercise sets with practical coding challenges
- 23 solution sets with detailed explanations and reasoning
- Runnable examples demonstrating key concepts
- 8 mini projects to build real skills
- 6 cheatsheets for quick reference
- 4 reference pages on built-ins and standard library
- pytest test suite to verify code quality
- MkDocs documentation site for easy navigation
All examples and projects use the Python standard library—no heavy dependencies required.
- Complete beginners with no programming experience
- Self-taught learners looking for structured guidance
- Students wanting a supplementary learning resource
- Developers from other languages transitioning to Python
- Educators seeking open-source curriculum materials
Begin with the Learning Path to understand the recommended reading order and how chapters connect.
Work through the Handbook chapters in sequence. Each chapter includes:
- Clear explanations of core concepts
- Practical, runnable examples
- Common mistakes to avoid
- Key takeaways
After each chapter, try the Exercises. If you get stuck, check the Solutions for detailed explanations and code.
Reinforce your learning by building the Mini Projects. Start with simpler projects and progress to more complex ones.
Use the Cheatsheets and References as quick lookup guides while coding.
- Python 3.10 or higher
- pip (comes with Python)
- Git
-
Clone the repository:
git clone https://github.com/neikiri/python-handbook.git cd python-handbook -
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- Windows (cmd):
venv\Scripts\activate
- Windows (PowerShell):
venv\Scripts\Activate.ps1
- macOS/Linux:
source venv/bin/activate
- Windows (cmd):
-
Install development dependencies:
python -m pip install -e ".[dev]"
Serve documentation locally:
python -m mkdocs serveThen open http://localhost:8000 in your browser.
Build documentation:
python -m mkdocs build --strictRun tests:
python -m pytestCompile Python files (check for syntax errors):
python -m compileall examples projects testspython-handbook/
├── docs/
│ ├── handbook/ # 23 main chapters
│ ├── exercises/ # 23 exercise sets
│ ├── solutions/ # 23 solution sets
│ ├── projects/ # Mini project descriptions
│ ├── cheatsheets/ # 6 quick reference guides
│ ├── references/ # 4 reference pages
│ ├── index.md # Documentation home
│ ├── learning-path.md # Recommended reading order
│ └── faq.md # Frequently asked questions
├── examples/ # Runnable Python examples
├── projects/ # 8 mini project implementations
├── tests/ # pytest test suite
├── .github/
│ ├── workflows/ # CI/CD pipelines
│ └── ISSUE_TEMPLATE/ # Issue templates
├── .kiro/ # Kiro specs, steering, and local agent hooks
├── pyproject.toml # Project metadata and dependencies
├── mkdocs.yml # MkDocs configuration
├── README.md # This file
├── LICENSE # MIT License
├── CONTRIBUTING.md # Contribution guidelines
├── CODE_OF_CONDUCT.md # Community standards
├── SECURITY.md # Security policy
├── CHANGELOG.md # Version history
└── .gitignore # Git ignore rules
Build these projects to apply what you've learned:
| Project | Topics | Difficulty |
|---|---|---|
| Number Guessing Game | Variables, loops, conditionals | Beginner |
| Password Generator | Strings, random module, functions | Beginner |
| Word Counter | File I/O, strings, dictionaries | Beginner |
| To-Do CLI | Lists, file I/O, user input | Intermediate |
| Personal Notes App | JSON, file I/O, functions | Intermediate |
| CSV Sales Report | CSV module, data processing | Intermediate |
| Log Analyzer | File I/O, regex, data analysis | Intermediate |
| Budget Tracker | JSON, data structures, functions | Intermediate |
- Handbook — Complete Python curriculum from basics to practical intermediate topics
- Learning Path — Structured progression through chapters
- Exercises — Practice problems for each chapter
- Solutions — Detailed solutions with explanations
- Projects — Mini project descriptions and requirements
- Cheatsheets — Quick reference for syntax and standard library
- References — In-depth documentation on built-ins and modules
- FAQ — Answers to common questions
- Python 3.10+ — All code examples and projects
- MkDocs Material — Documentation site generation
- pytest — Testing framework
- Python standard library — used for all examples and mini projects
We welcome contributions! Whether you're fixing typos, improving explanations, adding examples, or creating new content, your help makes this resource better for everyone.
Please read CONTRIBUTING.md for:
- How to report issues
- How to submit pull requests
- Code style guidelines
- Content standards
- Code of Conduct — See CODE_OF_CONDUCT.md
- Security Policy — See SECURITY.md
- Changelog — See CHANGELOG.md
This project is licensed under the MIT License — see the LICENSE file for details.
Built for self-taught learners, students, and anyone starting their Python journey. This is a community-driven project created to make Python education accessible and practical.
Happy coding! 🐍