passing a list to another function to reverse it using python code example
Example 1: reverse an array pyton
array=[0,10,20,40]
reversed_array=array[::-1]
Example 2: reverse array python
>>> array=[0,10,20,40]
>>> for i in reversed(array):
... print(i)