for loop from n to 0 in python code example
Example 1: python for loop backwards
for i in range(len(item)-1, -1, -1):
print(item[i])
Example 2: python for loop 0 to n
def range_back(start,end):
return chain(range(start,end),range(end,start,-1))