Home >>Python Programs >Python program to print the elements of an array in reverse order
In this example, we will see a Python program in which we can print the elements of an array in reverse order.
Printing an array in reverse order means that the last element of the array should be displayed first, followed by second last element and so on.
#Initialize array with 5 values corresponding 10 20 30 40 50
array = [10,20,30,40,50];
print("Here is the Original array: ");
for i in range(0, len(array)):
print(array[i]),
print("Here is Array in reverse order: ");
#Loop through the array in reverse order
for i in range(len(array)-1, -1, -1):
print(array[i]),