28. Augmented Assignment Operator Flashcards
1
Q
What does augment assignment operator do?
A
Instead of doing this to add 5 to 2:
some_value = 5
some_value = some_value + 2
,you do this instead, and just add += to add both numbers
some_value = 5
some_value += 2
2
Q
how do you subtract?? multiply??
A
some_value = 5
some_value-=2
3
multiply
*=