How to make Python's enumerate
function to enumerate from bigger numbers to lesser (descending order, decrement, count down)? Or in general, how to use different step increment/decrement in enumerate
?
For example, such function, applied to list ['a', 'b', 'c']
, with start value 10
and step -2
, would produce iterator [(10, 'a'), (8, 'b'), (6, 'c')]
.
(counter + 1)*10
. – Loughlin