iterate python list backwards code example
Example 1: how to reverse a list in python using for loop
a = ['a', 'b', '4', '5', 'd'] #reverse the List
for i in reversed(a):
print(i)
Example 2: iterate backwards through a list python
a = ["foo","bar","baz"]
for i in range(len(a)-1,-1,-1):
print(a[i])