python 3 program to find the reverse of a list code example
Example 1: how to revert a list python
>>> array=[0,10,20,40]
>>> for i in reversed(array):
... print(i)
Example 2: reverse list python
list=[1,2,3]
list[::-1]
>>> array=[0,10,20,40]
>>> for i in reversed(array):
... print(i)
list=[1,2,3]
list[::-1]