Tutorial
Python Tutorial
A practical guide to Python programming, from basics to productive code. Covers syntax, data structures, OOP, the standard library, and idiomatic patterns.
Chapters
About this tutorial
A practical guide to Python programming, from basics to productive code.
Contents
| File | Description |
|---|---|
| 01-basics.md | Installation, REPL, syntax fundamentals |
| 02-data-types.md | Strings, numbers, booleans, None |
| 03-control-flow.md | Conditionals, loops, match statements |
| 04-functions.md | Defining functions, args, decorators |
| 05-data-structures.md | Lists, dicts, sets, tuples, comprehensions |
| 06-oop.md | Classes, inheritance, dunder methods |
| 07-modules-packages.md | Imports, packages, virtual environments |
| 08-file-handling.md | Reading, writing, paths, context managers |
| 09-error-handling.md | Exceptions, try/except, custom errors |
| 10-standard-library.md | Essential stdlib modules |
| 11-pythonic-patterns.md | Idiomatic Python, best practices |
Prerequisites
- Terminal/command line basics
- Any text editor or IDE
Quick Start
# Check Python version (need 3.10+)
python3 --version
# Start interactive REPL
python3
# Run a script
python3 script.py
Why Python?
- Readable syntax that emphasizes clarity
- Massive ecosystem of libraries
- Great for scripting, automation, data science, web backends
- Rapid prototyping and development