mylist
[1, 2, 3, 4, 5]
mylist[::-1]
[5, 4, 3, 2, 1]
my_list = [1, 2, 3, 4, 5]
my_list.reverse()
# reversing a list in Python
numbers = [1,2,3,4,5,6,7,8,9]
print(numbers[::-1])
>>> array=[0,10,20,40]
>>> for i in reversed(array):
... print(i)
list = [1,2,3,4,5]
reversed_list = list[::-1] # [::-1] [start : stop : step]
print(reversed_list)
num = [1,2,3]
r = num[::-1]
print(r)
lst = [1, 2, 3]
reversed_lst = reversed(lst)
reverse list