Augmented Assignment Operators in Python | `+=`, `-=`, `*=`, `/=` & More

Опубликовано: 30 Август 2026
на канале: Computer Sir Ki Class
6
1

Computer Sir! Can arithmetic operators be used with assignment?

Yes! In this video, we learn about *augmented assignment**, also called **compound assignment* or *shorthand assignment* in Python.

Instead of writing an assignment such as `a = a + 10`, Python allows a shorter form using an augmented assignment operator.

We understand how these operators work and how each operation updates the value referred to by the variable.

The video covers:

Augmented / compound assignment
`+=`, `-=`, `*=`
`/=`, `//=`, `%=`
`**=`
How augmented assignment works with the current value
Why Python does not have `++` and `--`
The Python equivalent of increment and decrement operations
The connection between augmented assignment and Python's immutable objects

This is an important shortcut that makes Python code shorter and easier to write.

#Python #AugmentedAssignment #AssignmentOperators #PythonOperators #PythonTutorial #LearnPython #PythonForBeginners #ComputerSirKiClass