Welcome to Python Programming - Fundamentals — a complete introduction to Python designed for people who have never written code before, but want a path that leads naturally into AI and machine learning.
Python was created in 1991 by Guido van Rossum with one goal: code that reads almost like English. Thirty years later, it has become the language of choice for data science, machine learning, web backends, automation, and scientific computing. If you want to work with AI tools, train models, or analyse data, Python is the most direct path.
What You’ll Learn
By the end of this course, you’ll be able to:
- Read and write Python programs with confidence
- Understand the building blocks of programming — variables, conditions, loops, functions
- Work with Python’s data structures — lists, tuples, sets, dictionaries
- Write clean, type-checked code using modern Python features
- Organise code with modules, packages, and classes
- Handle files, JSON, and CSV data
- Use NumPy to work with numerical arrays — the first step toward machine learning
Course Outline
- Getting Started — Install Python with uv, set up your editor, run your first script
- Variables and Primitive Types — Numbers, strings, booleans, type conversion
- Operators and Expressions — Arithmetic, comparison, logical, and other operators
- Control Flow — Conditions, loops, and pattern matching
- Functions — Define, call, and type-hint reusable code
- Core Data Structures — Lists, tuples, sets, dictionaries
- Pythonic Functional Tools —
map,filter,zip,enumerate, and friends - Iterators and Generators — Lazy evaluation and data pipelines
- Exception Handling — Catch, raise, and recover from errors
- File Handling — Read and write text, CSV, JSON files with
pathlib - Modules and Packages — Organise code across many files
- Object-Oriented Programming — Classes, objects, and inheritance
- Type System and Protocols — Strict typing with
pyrightand structural types - Useful Standard Library Modules —
math,random,datetime,collections, and more - Debugging and Code Quality — Tracebacks, logging,
ruff, PEP 8 - NumPy Fundamentals — Arrays, broadcasting, vectorisation
A Note on Modern Python
This course uses modern Python. That means:
- Python 3.12 or newer — older Python (especially Python 2) is long retired
uvfor installing Python, creating virtual environments, and managing packages — it has replaced the oldpip+venvworkflow used in most tutorials- Strict type hints with
pyright— every function we write has typed parameters and return values, because the type checker catches bugs before the program runs rufffor both linting and formatting — one tool instead of two
You’ll learn the older tools (pip, venv) by name so you can recognise them in legacy code, but we’ll write everything the modern way.
Prerequisites
None. This course assumes zero prior programming experience. You’ll need:
- A computer running macOS, Linux, or Windows
- A text editor (we’ll recommend VS Code, but anything works)
- Curiosity, and an hour or two a week
That’s all. We’ll install Python, set up your editor, and walk through every step together.
Let’s begin.