step = int(input('enter a step size to count down by '))
for i in range(0,31,step):
print(i)
I would like to know how to make this loop count down instead of up like it currently does. Thanks. (edit): I had previously tried swapping the start and stop values, which didn't work. Then i tried making 'step' negative int the range function which didn't work. I wasn't aware that doing both of these things together was a viable solution. Thanks to everyone who posted in response