small steps

Python basics

Start from nothing: install Python, try it out in the shell, and run your first program. Then use the pieces almost every Python program needs: lists, dictionaries and for loops, f-strings for readable output, and pathlib for real files. More parts are on their way. Each tutorial ends with code that runs, so you can stop between them and pick up where you left off.

Basics4 tutorialsAbout 1 h 12 minNeeds: Variables and if statements
Start the path
  1. Install Python and run your first program

    Install Python on Windows, macOS or Linux, try it out in the shell, then write a small card about yourself in VS Code and run it.

    17 min
  2. Work with lists, dictionaries and for loops in Python

    Keep a week of step counts in a list and a dictionary, then loop over them to find the total, the average, your best day and the days you hit your goal.

    18 min
  3. Format text and numbers with Python f-strings

    Put values into text, round and line up numbers, and debug faster with f-strings, by printing a small café bill one step at a time.

    12 min
  4. Read and write files with Python's pathlib

    Save notes, read a CSV of expenses and list a folder with pathlib, the modern way to work with files in Python on any computer.

    25 min