On Wed, Jul 20, 2016, at 13:42, Ian Kelly wrote:
> I had occasion to write something like this:
> 
>     for i, n in reversed(enumerate(x)): pass
> 
> How would you write this?

I'd write my own version of enumerate with a step argument, and call
enumerate(reversed(x), start=len(x), step=-1)
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to