0

What occurs with +/-=3?

What's the negative or plus sign before = do?

11th Mar 2021, 3:22 PM
A.13S.
3 odpowiedzi
+ 3
x += 3 is same as x = x+3 and so on
11th Mar 2021, 3:31 PM
durian
durian - avatar
+ 3
This += , or -= etc are known as short hand operator, So as Lily Mea have mentioned that x += 3 is same as x = x + 3 ,so it's same with other also like for multiply x *= 3 etc. It is given in python course!! https://code.sololearn.com/c1Drn4iro5Ay/?ref=app
11th Mar 2021, 4:34 PM
Abhiyantā
Abhiyantā - avatar
0
Lily Mea Thanks!
11th Mar 2021, 3:45 PM
A.13S.