how to loop in reverse in python code example
Example 1: reverse iteration python
for i in range(10, 0, -1):
#reverses backwards from 10
Example 2: reverse for loop in python
for i in range(10, -6, -2):
print(i)
for i in range(10, 0, -1):
#reverses backwards from 10
for i in range(10, -6, -2):
print(i)