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
list_data = [1,2,3,4,5] l = len(list_data) i=l+1 rev_data = [] while l>0: j=i-l l-=1 rev_data.append(list_data[-j]) print "After Rev:- %s" %rev_data