I am trying to reverse the index given by enumerate whilst retaining the original order of the list being enumerated.
enumerate
Assume I have the following:
I don't know if this solution is better for you, but at least it's shorter:
>>> [(4 - x, x) for x in range(5)] [(4, 0), (3, 1), (2, 2), (1, 3), (0, 4)]