reverse for loop code example
Example 1: python for loop backwards
for i in range(len(item)-1, -1, -1):
print(item[i])
Example 2: reverse for loop
for (int i = myArray.Length - 1; i >= 0; i--)
{
// Do something ...
}
for i in range(len(item)-1, -1, -1):
print(item[i])
for (int i = myArray.Length - 1; i >= 0; i--)
{
// Do something ...
}