Learn Python by reading short notebooks and running small scripts — core syntax first, then the data stack (NumPy, Pandas, Matplotlib, Seaborn), then the real-world bits nobody teaches you: file handling, serialization, exceptions, threading, CLIs.
Not sure where you stand? Take the level check quiz first, then start at the matching step below.
git clone https://github.com/utk2103/Python-for-beginners.git
cd Python-for-beginners
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
jupyter lab # or: jupyter notebookScripts need no setup beyond the standard library unless their header says otherwise:
python scripts/BinarySearch.py
python scripts/argparse_1.py 7 3 multiplyWork top to bottom. Each notebook is self-contained, so you can also jump straight to a topic.
| Notebook | Covers |
|---|---|
| Python basics | variables, numeric/str/bool types, operators, I/O |
| Conditionals and booleans | if/elif/else, truthiness, comparison chaining |
| Loops and iterators | for, while, range, iterators vs iterables |
| Functions | arguments, defaults, return values, scope |
| Lambda functions | anonymous functions, map/filter/sorted(key=…) |
| Notebook | Covers |
|---|---|
| Lists | indexing, slicing, list methods, comprehensions |
| Dictionaries | key/value access, iteration, nesting |
| Notebook | Covers |
|---|---|
| Exception handling | try/except/else/finally, raising, custom errors |
| File handling + serialization (1) | reading/writing files, modes, context managers |
| File handling + serialization (2) | JSON and pickle round-trips |
| Decorators & namespaces | closures, @decorator, LEGB scope rules |
| Notebook | Covers |
|---|---|
| NumPy | arrays, dtypes, shapes, broadcasting, vectorised math |
| Pandas | Series/DataFrame, selection, cleaning, grouping |
| Matplotlib | figures, axes, line/bar/scatter, labels and legends |
| Seaborn 1 → 2 → 3 → 4 | statistical plots, distributions, categorical plots, heatmaps |
Algorithms and small programs in scripts/ — searching, sorting, recursion, CLIs, threading, enum. A full index with one-line descriptions is issue #15, up for grabs.
Python-for-beginners/
├── notebooks/ # Interactive lessons, one topic per notebook
├── scripts/ # Standalone runnable .py files
├── Decorators & Namespaces/ # Decorator + scope notebook
├── data/ # Small sample files (txt, json, pkl) for practice
├── docs/ # Extra guides (pdf2docx setup, Tower of Hanoi visual)
├── resources/ # Reference PDFs, cheat sheets, notes
├── requirements.txt # Notebook + data-stack dependencies
└── .github/ # Issue templates
The resources/ folder holds PDFs for when you want a second explanation: a Python cheat sheet, Automate the Boring Stuff, Python Crash Course, a list of built-in methods, and 52 practice Q&As.
New contributors are welcome, and this repo is a good place to make a first open-source PR.
- Browse good first issues.
- Comment on the one you want so nobody duplicates your work.
- Read CONTRIBUTING.md for the fork → branch → PR walkthrough and the style rules.
Ideas outside the open issues are welcome too — open an issue first so we can agree on the shape before you write code.