I am finding problems in when I should use *= or be explicit in using my code. I'm trying to do simple integer multiplication and addition in Python. So to take a number, multiply it by 3 and add 1. Is there a specific situation where I should use:
number *= 3 number += 1 Or
number = (number * 3) + 1 Is there a difference between the two, or is this a matter of personal preference?
numberis an integer or a float.