function to reverse aray in python code example
Example 1: reverse an array pyton
array=[0,10,20,40]
reversed_array=array[::-1]
Example 2: reverse list python
list=[1,2,3]
list[::-1]
array=[0,10,20,40]
reversed_array=array[::-1]
list=[1,2,3]
list[::-1]