how to print reverse order using loop in python code example
Example 1: inverted for python
for i in reversed(range(5)):
print(i)
Example 2: reverse for loop in python
for i in range(10, -6, -2):
print(i)
for i in reversed(range(5)):
print(i)
for i in range(10, -6, -2):
print(i)