Skip to content

Glossary: Python Basics

Running total

Also written: accumulator, adding things up

A variable that starts at 0 before a loop and has each item added to it inside the loop, as in `total += price`. The same pattern can count items.

Where the book teaches it

Related terms

+=for loop