02Season 2 · One of 18 Seasons

Python

The Season in Short

Season 2 teaches the Python that AI work really uses: from your first script to classes, type hints, API calls, async code and tests. It is not all of Python; each lesson covers what later seasons need and says where it is used.

  • 17lessons in order
  • 17hands-on skill lessons
  • 16 of 16career paths take it
  • 49.8%of AI job ads ask for Python, first taught here

The Season Explained

What You Learn in Python

Read, write, test and debug Python with confidence, including code written by AI.

What the Season Covers

You begin in the browser with Google Colab, then install Python locally with a virtual environment. Step by step you learn variables, strings, collections, loops, functions, files and errors, the building blocks every AI script is made of, then modules, packages and uv to keep projects reproducible.

The second half reaches professional code: classes and objects (every SDK client is one), type hints and Pydantic to validate data, reading and debugging code you did not write, calling web APIs with keys kept out of the code, async and high-concurrency calls that stay inside rate limits, and testing with pytest. The season ends with a real command-line tool built from a blank file.

Why Employers Ask for It

Python is the most requested skill in AI job ads. Employers ask for production-grade Python and pytest because AI tools now write a lot of code, and the person who can read, test and fix that code is the one they hire.

What You Can Do at the End

  • Write, run and debug Python scripts in a virtual environment.
  • Use lists, dicts, functions, files and exceptions to build small reliable programs.
  • Write classes, add type hints and validate outside data with Pydantic.
  • Call web APIs safely, with keys in a .env file, retries and rate limits.
  • Test your code with pytest and ship a command-line tool.

How the Season Builds

  1. 1

    First Steps

    Python in the browser and on your machine, then values, text and the containers that hold them.

  2. 2

    Programs That Decide and Repeat

    Loops, functions, files, errors and packages: the core of every script.

  3. 3

    Professional Code

    Classes, type hints and Pydantic, reading code you did not write, and calling real APIs.

  4. 4

    Fast, Tested, Shipped

    Async and concurrent calls inside rate limits, tests with pytest, and a finished command-line tool.

What You Build

You build a notes tool that grows lesson by lesson, an openFDA drug label lookup that never exposes its key, 200 API calls with zero rate-limit errors, and a tested command-line tool.

Industry Example: Pharma

Several projects use public drug label records: validating them with Pydantic, looking them up through an API, and fetching hundreds of them inside a rate limit. The code is identical for any dataset.

A Common Mix-Up

print is not return. A function that prints a value shows it on screen but gives nothing back to the code that called it.

Where It Leads

Season 3 puts your Python projects under version control with Git and GitHub, and every later season writes its code in this Python.

The 17 Lessons, in Order

17 skill lessons end in a mini project you build; there is no orientation lesson in this season.

  1. S2 · #18

    Install Python, First Script

    Run Python in the browser and on your machine, inside a virtual environment, and read your first error.

    SkillComing
  2. S2 · #19

    Variables, Types, Operators

    Store values in well-named variables, know their types, calculate and compare.

    SkillComing
  3. S2 · #20

    Strings and f-strings

    Clean, slice, search and assemble text, including a full prompt template.

    SkillComing
  4. S2 · #21

    Lists, Dicts, Tuples, Sets

    Store many values in the right container, including JSON-shaped records.

    SkillComing
  5. S2 · #22

    Conditionals and Loops

    Make a program decide and repeat, with a loop that always knows when to stop.

    SkillComing
  6. S2 · #23

    Functions

    Turn repeated code into small named functions with inputs and results.

    SkillComing
  7. S2 · #24

    File I/O and Parsing

    Read and write text, CSV and JSON files and turn them into data.

    SkillComing
  8. S2 · #25

    Errors and Exceptions

    Read any traceback, handle expected errors and retry without crashing.

    SkillComing
  9. S2 · #26

    Modules, Packages, Dependencies

    Split code into modules and set up a reproducible project with uv.

    SkillComing
  10. S2 · #27

    Classes and Objects

    Write classes, create objects, and read any SDK client's code.

    SkillComing
  11. S2 · #28

    Type Hints and Pydantic

    Annotate code, catch type mistakes early, and validate outside data.

    SkillComing
  12. S2 · #29

    Reading Code You Didn't Write

    Find your way in unfamiliar code, debug with breakpoints, review AI-written code.

    SkillComing
  13. S2 · #30

    Calling Web APIs in Python

    Call a real API from Python, handle answers and errors, keep the key out of code.

    SkillComing
  14. S2 · #31

    Async Python

    Run many slow network calls at once, and know when async helps.

    SkillComing
  15. S2 · #32

    High-Concurrency Python

    Run hundreds of API calls fast while staying inside the rate limit.

    SkillComing
  16. S2 · #33

    Testing With pytest

    Write automated tests and read exactly what failed and why.

    SkillComing
  17. S2 · #34

    Mini-Project: A CLI Tool

    Build, test and ship a real command-line tool from a blank file.

    SkillComing

What Job Ads Ask For, Taught Here

Share of 3,054 technical job ads at AI companies that name each skill this season teaches (November 2026, ai2hired AI Job Skills Index).

  1. PythonInstall Python, First Script49.8%

Free Credentials It Counts Toward

Lessons you mark done in Season 2 count toward these free, verifiable badges.

The Books Behind the Season

6 books and official texts the lessons are built from, credited in each lesson's description.

The full library

Questions About Season 2

What is Season 2 of ai2hired about?

Season 2 teaches the Python that AI work really uses: from your first script to classes, type hints, API calls, async code and tests. It is not all of Python; each lesson covers what later seasons need and says where it is used.

What can I do after Season 2?

Write, run and debug Python scripts in a virtual environment. Use lists, dicts, functions, files and exceptions to build small reliable programs. Write classes, add type hints and validate outside data with Pydantic. Call web APIs safely, with keys in a .env file, retries and rate limits. Test your code with pytest and ship a command-line tool.

Which AI careers need Season 2?

16 of the 16 career paths take lessons from this season, and 11 take all 17: AI Engineer, AI Engineering Manager or Head of AI, AI Research (the foundation), AI Security or Safety Engineer and others. Each career page lists its exact lessons.

How many lessons are in Season 2, and are they free?

17 lessons: 17 skill lessons with a hands-on mini project and 0 orientation lessons. Every lesson is free on YouTube and on ai2hired.org, with a free workbook for each published lesson.

What do I need before Season 2?

The seasons before it. Every lesson builds only on lessons that come earlier, so nothing is used before it is taught. The season just before is Season 1, Computer and Internet Foundations.

03Up Next · Season 3

Git and GitHub

Work like a professional engineer, with version control, code review and automated checks.

Previous · Season 1Computer and Internet Foundations

Follow Season 2 as It Comes Out

Every lesson is free. Get each one the day it goes live.