How can I do the following in Python?
array = [0, 10, 20, 40] for (i = array.length() - 1; i >= 0; i--)
I need to have the elements of a
With reversed and list:
>>> list1 = [1,2,3] >>> reversed_list = list(reversed(list1)) >>> reversed_list >>> [3, 2, 1]