Skip to content
CareerBridge
← Python: your first useful programs
GUIDED STARTER LESSON

Build a practice ticket summary

Repeat an action for each item in a list.

Understand the idea

A list groups several values. A for loop visits its items in order.

Choose a clear variable name for the item being visited. The loop body is indented.

Documentation is part of a useful program: explain its input, output and limits.

Worked example

This loop prints three fictional support tasks. It does not execute repairs or connect to another computer.

tasks = ["Ask what failed", "Record the error", "Explain the next step"]
for task in tasks:
    print("-", task)