gitmyhub

learn-python3

HTML ★ 6.8k updated 2y ago

Jupyter notebooks for teaching/learning Python 3

A structured collection of interactive Jupyter notebooks for learning Python 3 from scratch, covering 19 beginner topics through intermediate best practices, with separate exercise notebooks to practice each concept.

PythonJupytersetup: easycomplexity 1/5

This repository is a structured collection of teaching materials for learning Python 3, organized as interactive Jupyter notebooks. A Jupyter notebook is a document that mixes written explanations, runnable code cells, and output all in one page, so you can read about a concept and immediately try it out without switching between tools.

The content is divided into two levels. The beginner section covers 19 topics in a deliberate order: strings, numbers, conditional logic, lists, dictionaries, loops, functions, testing with pytest, file input and output, classes, exceptions, modules, debugging, parts of the standard library, virtual environments, and project structure. Each topic comes with a reading notebook and a separate exercise notebook where you write code to practice what you just learned. Two recap exercises appear along the way to check understanding across multiple topics at once.

The intermediate section goes further and includes two broad areas. The first is idiomatic Python, covering the style and patterns that experienced Python developers use: comprehensions, generators, decorators, context managers, and features from the standard library that beginners often miss. The second area covers best practices around writing production-quality code: writing clean code, logging, testing approaches, and continuous integration.

You can run the notebooks locally by installing Python 3.10 or newer, installing Jupyter with pip, cloning the repository, and running the jupyter notebook command in the project folder. This opens a browser session where you navigate to any notebook and start working through it. If you do not want to set anything up, the repository also links to Binder, a free online service that opens the entire project in a cloud-hosted Jupyter session with one click. Static HTML versions of each notebook are linked from the README for reading without running any code.

The materials are designed for both self-learners working through them independently and instructors teaching a course. Contributing guidelines are included for anyone who wants to add or improve content.

Where it fits