reverse pythoon code example
Example 1: reverse an array pyton
array=[0,10,20,40]
reversed_array=array[::-1]
Example 2: reverse function python
# The Reverse operation - Python 3:
Some_List = [1, 2, 3, 4, 1, 2, 6]
Some_List.reverse()
print(Some_List)
# Result: [6, 2, 1, 4, 3, 2, 1]