Before we write any code, we need to understand what Python is, get it installed, and set up the tools we’ll use throughout the course. This section is the foundation everything else builds on.

What’s in this section

  1. What is Python — a short history and what kind of programs people build with it
  2. Installing Python with uv — get Python and the modern toolchain in one step
  3. The REPL — Python’s interactive prompt, where you can try ideas instantly
  4. Running Python files — save your code to disk and run it
  5. VS Code setup — configure an editor that makes Python pleasant
  6. Linting and formatting with Ruff — keep your code clean automatically
  7. How Python code executes — what really happens when you press Run
  8. Virtual environments — isolate each project’s dependencies
  9. Adding packages with uv — install libraries from the Python Package Index

By the end of this section, you’ll have a working Python environment, an editor that catches mistakes, and a clear picture of how your code goes from text on disk to a running program.

Let’s start with the basics — what is Python, and why has it taken over the AI world?

Toggle theme (T)