In line 4 why do we have to add \"=\" after \"-\" ?
num = 5 if num > 2: print(num) num -= 1 print(num)
-= is an operator. This operator is equals to subtraction.
-=
num -= 1 means is num = num - 1
num -= 1
num = num - 1
It is used to subtraction from the itself with given value in right side.