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

  1. Getting Started — Install Python with uv, set up your editor, run your first script
  2. Variables and Primitive Types — Numbers, strings, booleans, type conversion
  3. Operators and Expressions — Arithmetic, comparison, logical, and other operators
  4. Control Flow — Conditions, loops, and pattern matching
  5. Functions — Define, call, and type-hint reusable code
  6. Core Data Structures — Lists, tuples, sets, dictionaries
  7. Pythonic Functional Toolsmap, filter, zip, enumerate, and friends
  8. Iterators and Generators — Lazy evaluation and data pipelines
  9. Exception Handling — Catch, raise, and recover from errors
  10. File Handling — Read and write text, CSV, JSON files with pathlib
  11. Modules and Packages — Organise code across many files
  12. Object-Oriented Programming — Classes, objects, and inheritance
  13. Type System and Protocols — Strict typing with pyright and structural types
  14. Useful Standard Library Modulesmath, random, datetime, collections, and more
  15. Debugging and Code Quality — Tracebacks, logging, ruff, PEP 8
  16. 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
  • uv for installing Python, creating virtual environments, and managing packages — it has replaced the old pip + venv workflow 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
  • ruff for 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.

Toggle theme (T)