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
The most direct translation of your requirement into Python is this for statement:
for
for i in xrange(len(array) - 1, -1, -1): print i, array[i]
This is rather cryptic but may be useful.