Check my levelCoursesProgramsFor teamsPricing
UKSign inSign up
Check my levelCoursesProgramsFor teamsPricingClaude quizPromptsBlogFAQSearchSign upUK
AcademlCoursesPython with AI from Zero: Scripts for WorkVariables, lists, conditions and loops on real work examples
A five-line Python script finds unpaid clients in a sales tableClaude Code terminal: the claude -p command with Read and Edit allowedRetries after a 429 error: each pause is twice as long, then success
Course

Python with AI from Zero: Scripts for Work

Module 1 · First script
01Install Python and run your first AI-written script02Variables, lists, conditions and loops on real work examples
Module 2 · Files and spreadsheets
03Files and CSV: read, filter, save04Excel tables with pandas: summary, filter, .xlsx report
Module 3 · AI inside your script and automation
05Calling a model from Python: the official openai and anthropic SDKs06Automating chores and checking the code AI wrote
Python with AI from Zero: Scripts for Work · Lesson 2

Variables, lists, conditions and loops on real work examples

Learn the eight building blocks behind almost every AI-written script: variables, types, lists, dictionaries, if, for, range and functions. Practise reading code on a shop's sales and asking AI to explain a line you do not get.

35 min read4 questions in quizReady prompt included

Why read code if AI writes it

AI writes code fast, and it makes mistakes with the same confidence it answers with. It can pick the wrong column, use the wrong discount threshold, or leave out a day of revenue. You can only catch that if you understand what the script says. You do not need to write from scratch. It is enough to recognise eight building blocks that make up almost every working script: variables, types, lists, dictionaries, conditions, loops, range and functions.

This whole lesson uses the sales of the shop from lesson 1. Create basics.py in your work-python folder and try the examples as you read.

The rest of this lesson opens after a free sign-up

Sign up with email or Google: the first two lessons of every course stay open for good, and the whole catalog is open for 7 days. No card needed.

Sign up freeOr a trial lesson, no sign-up →
In this lesson
Why read code if AI writes itVariables: labelled boxesTypes: text, whole numbers and decimalsLists: several values in orderDictionaries: values by nameConditions: if, elif, elseThe for loop: go through every rowrange: looping over numbersFunctions with def: give an action a namePutting it together: a sales reportHow to read code an AI gave youAsk it to explain a linePracticeReady promptQuiz
CoursesLLM coursesFor teamsPricingFAQBlogAboutPrivacy
© 2026 AcademlDevelopment & promotion —MMIX — Marketing Mix
Get started free