loop reverse in python code example
Example 1: python for loop backwards
for i in range(len(item)-1, -1, -1):
print(item[i])
Example 2: reverse iteration python
for i in range(10, 0, -1):
#reverses backwards from 10
for i in range(len(item)-1, -1, -1):
print(item[i])
for i in range(10, 0, -1):
#reverses backwards from 10