Back to catalog
Programming basicsBeginner

Python from Zero: Automate Your Own Work

Write scripts that sort folders, parse spreadsheets and build reports — starting from the first line of code you have ever written.

Python from Zero: Automate Your Own Work

About this course

A first programming course for someone who has a pile of files, a spreadsheet nobody wants to touch and an hour of the same clicking every Monday. By the end you will have written a script that walks a folder, reads every CSV in it, skips the broken rows out loud and writes one report.

Twelve lessons take you from running the interpreter to functions, exceptions, files, encodings, CSV and JSON, modules and virtual environments. Every example is a complete, runnable script: nothing is a fragment, and every line of output in the text was produced by actually running the code.

The traps get the same attention as the features — the mutable default argument, a copy that is not a copy, is versus ==, floor division on negative numbers, comparing floats, a file read in the wrong encoding, and tabs mixed with spaces. These are what make a first month painful, and they are cheaper to learn about here than at two in the morning.

Course curriculum

  1. How a Python program runs

    The interpreter, your first script, why indentation is part of the grammar, and the numbers and strings you will use in every script afterwards.

    • 1.The interpreter, the REPL and your first script10 min
    • 2.Names, numbers and strings12 min
  2. Input, output and decisions

    Getting data in and out of a script, formatting it so a human can read it, and branching on conditions without falling into the is/== trap.

    • 1.Input, output and formatting11 min
    • 2.Conditions, truthiness and the is trap12 min
  3. Collections: lists, dictionaries, tuples and sets

    The four containers that hold everything a script works on, when to reach for which, and the copy-versus-reference mistake that silently corrupts data.

    • 1.Lists, slices and the copy trap13 min
    • 2.Dictionaries and sets12 min
    • 3.Loops, unpacking and comprehensions13 min
  4. Functions and errors

    Packing logic into functions without the mutable-default trap, and treating a traceback as a map to the bug instead of a wall of red text.

    • 1.Functions, arguments and the mutable default14 min
    • 2.Reading a traceback and handling exceptions13 min
  5. Files, data formats and the standard library

    Reading and writing files without losing characters, handling CSV and JSON with the modules that exist for it, and assembling a script that produces a real report.

    • 1.Files, with, and encodings14 min
    • 2.CSV and JSON13 min
    • 3.Modules, pip, venv and a script that does real work16 min