Augmented Assignment

Domain: Programming Fundamentals

🎯 Motivation

Updating a variable based on its current value is so common that Python has shortcuts: +=, -=, *=, /=.

📋 Concrete Example

score += 10 is the same as score = score + 10 but shorter. count -= 1 decrements. total *= 2 doubles.

🔗 Analogy

Refilling a water bottle - instead of pouring out the old water, measuring it, adding more, and pouring back (x = x + y), you just top it up (x += y).