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