Skip to content

Glossary: Python Basics

+=

Also written: -=

A shortcut that changes a variable using its own current value. `stock += 5` means `stock = stock + 5`, and `total += price` adds each price to a running total.

Where the book teaches it