I have a for loop with a 100 iterations and I would like to change the value of a variable for every 10 iterations. One way of doing this would be:
for i in range(100):
if i < 10:
var = 1
elif i < 20 :
var = 1.5
...
But I don't want to have 10 if statements. Is there a better way of doing it? In this case, the variable changes by the same amount for every 10 iterations.