function that reverses a list python code example
Example 1: python reverse list
list.reverse()
Example 2: how to revert a list python
>>> array=[0,10,20,40]
>>> for i in reversed(array):
... print(i)
list.reverse()
>>> array=[0,10,20,40]
>>> for i in reversed(array):
... print(i)