how to take a list of integers and return a list in reverse order code example
Example 1: python reverse list
list.reverse()
Example 2: how to reverse array in python
>>> L = [0,10,20,40]
>>> L[::-1]
[40, 20, 10, 0]
list.reverse()
>>> L = [0,10,20,40]
>>> L[::-1]
[40, 20, 10, 0]