What's the name of this operator "+=" ?
The addition assignment operator ( += ) adds the value of the right operand to a variable and assigns the result to the variable. The types of the two operands determine the behavior of the addition assignment operator.
It, along with -=
, *=
, etc., are called the augmented assignment operators in Python, and "compound assignment" operators everywhere else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With