Skip to content

Glossary

Key terms for this module and professional Python automation.

1. Repetition

repetition

Running the same block of code more than once.

Repetition is used in analytics when a program needs to process many rows, items, records, files, or values.

loop

A Python structure that repeats code.

Loops help automate work that would be slow or error-prone to do manually.

for loop

A loop that repeats once for each item in a collection.

Use a for loop when the program knows what collection it is processing.

range

A Python tool that creates a sequence of numbers.

range() is often used when code needs to repeat a specific number of times.

while loop

A loop that repeats while a condition remains true.

Use a while loop when repetition depends on a changing condition.

counter

A variable used to track how many times something has happened.

Counters are common in loops, file creation, and progress reporting.

list comprehension

A compact way to create a new list by transforming values from another list.

Use list comprehensions when the transformation is simple and readable.

iteration

One pass through a loop.

If a loop runs four times, it has four iterations.