This repository is a notebook-based learning path for building a solid foundation in Python. The notebooks begin with the VS Code Jupyter Notebook workflow and readable code conventions, then progress through variables, strings, control flow, data structures, comprehensions, and reusable functions.
Follow the notebooks in numerical order. Each notebook is self-contained, but the concepts build from basic expressions to a final functions challenge.
By the end of this repository, you should be able to:
- Work productively with Jupyter notebooks in VS Code.
- Write readable Python code using clear naming and formatting conventions.
- Use variables, numeric operators, strings, conditional statements, and loops.
- Choose and manipulate lists, tuples, dictionaries, and sets.
- Build concise collection transformations with comprehensions.
- Define, call, test, and explain reusable Python functions.
The modules build on each other in order.
VS Code notebooks and readable-code conventions.
| File | Description |
|---|---|
| 1 - Intro To Jupyter Notebook | Open notebooks in VS Code, select a kernel, execute cells, work with Markdown, and use notebook tooling |
| 2 - Coding Best Practices | Apply readable naming, whitespace, and formatting practices based on PEP 8 |
Variables, strings, conditions, and loops.
| File | Description |
|---|---|
| 1 - Numeric Variable Types | Work with variables, numeric data types, operators, and type conversion |
| 2 - Strings | Create, combine, index, slice, format, and iterate through text values |
| 3 - If Statements | Express conditional logic with if, elif, else, and boolean operators |
| 4 - Loops | Repeat operations with while and for loops and control execution with continue and break |
Collections, mutability, and concise transformations.
| File | Description |
|---|---|
| 1 - Lists | Store, modify, index, slice, and iterate through ordered collections |
| 2 - Tuples | Understand immutable sequences and compare them with mutable lists |
| 3 - Dictionaries | Map keys to values, update dictionaries, and loop through keys, values, and items |
| 4 - Sets | Store unique values and use set operations for membership and comparison |
| 5 - Comprehension | Build lists, dictionaries, and tuples concisely from iterables |
Reusable code, arguments, and final practice.
| File | Description |
|---|---|
| 1 - Introduction To Functions | Understand why functions are useful and define simple reusable operations |
| 2 - Function Definitions | Work with parameters, annotations, defaults, and multiple arguments |
| 3 - Calling Functions | Use positional and keyword arguments correctly |
| 4 - Challenge | Apply the unit's concepts in progressive practice tasks |
| File / Folder | Description |
|---|---|
| Solution | Complete solution versions of the notebooks with worked code and explanations |
| Assets | Local screenshots used in the VS Code Jupyter notebook introduction |
| pyproject.toml | Project configuration and dependency declarations |
| uv.lock | Reproducible dependency lock file |
Note
Throughout these steps, text in angle brackets like <repo-name> is a
placeholder. Replace it including the < > brackets with your own
value. For example, cd <repo-name> becomes cd my-python-basics-project.
Click Use this template on GitHub.
When creating the repository:
- Set yourself as the Owner
- Choose a repository name
- Disable Include all branches
- Click Create repository
Important
If you are working in pairs or groups, only one person should complete this step.
If you are working with teammates:
- Open the repository on GitHub
- Go to Settings → Collaborators
- Add your teammates as collaborators
- Share the repository link with your team
Copy the SSH URL from the Code button on GitHub, then run:
git clone <copied-ssh-url>The copied SSH URL will look like:
git@github.com:<your-username>/<repo-name>.git.
This installs all dependencies and creates a virtual environment in .venv/.
cd <repo-name>
uv syncNote
Open VS Code from the project root so it detects the environment created by uv sync.
Launch VS Code in the project root:
code .Then open a notebook and select the Python environment created by uv sync as the kernel.
- The Python Tutorial: Official Python introduction covering syntax, data structures, control flow, and functions.
- Built-in Functions:
Official reference for functions such as
len,range,type,print,input,zip, andsorted. - Jupyter Notebooks in VS Code: Official VS Code guide for notebook editing, kernels, variables, and cell execution.
- PEP 8 - Style Guide for Python Code: Widely used conventions for readable Python code.
- uv Documentation: Official documentation for dependency management and reproducible Python environments.