Module 01 of 13

Python for AI

Lessons

About This Module

Almost every AI tool you will use, from data libraries to model frameworks to LLM SDKs, is driven from Python. You don't need to be a Python expert to start, but you do need to read and write it comfortably. This module covers the core language: syntax and data structures, functions and modules, and virtual environments for keeping each project's packages separate.

It then moves to the habits that make AI code easier to maintain: type hints, object-oriented programming with classes and inheritance, and Jupyter notebooks for experimenting interactively. The last lessons cover asyncio, which you'll rely on when making many model calls at once, and working with APIs.

Watch the lessons in order, then continue on to Math & Statistics.

Lessons

6 videos
01

Python Crash Course: Setup, Syntax & Data Structures

Installing Python, then numbers, strings, lists, tuples, sets, and dictionaries, plus control flow, modules, exceptions, classes, and virtual environments.

02

Learn Python by Thinking in Types

A deeper pass through the language with a focus on types: variables, functions, args and kwargs, enums, decorators, error handling, and modules and packages.

03

Object-Oriented Programming in Python

Classes and objects, attributes and methods, properties, encapsulation and abstraction, inheritance, and polymorphism, the patterns behind most AI frameworks.

04

Jupyter Notebooks: A Complete Introduction

A tour of the Jupyter project, focusing on JupyterLab and Jupyter Notebooks, the interactive environment most AI experiments start in.

05

Asyncio in Python: Full Tutorial

Synchronous versus asynchronous code, the event loop, coroutines with async and await, tasks, gather, TaskGroup, and locks and semaphores for throttling concurrent work.

06

APIs for Beginners

What an API is and how the web works, exploring APIs with Postman, using helper libraries in Python, and building a small project that calls an API with Flask.