On Aug 21, 2011 1:34 PM, "Max" <maxmo...@gmail.com> wrote:
> > a[0:11][::-1]
> > # Instead of a[10:-1:-1], which looks like it should work, but doesn't.
>
> It works nicely, but it is 1.3 times slower in my code (I am surprised
> the interpreter doesn't optimize this).

Have you tried reverse()? I haven't timed it, but since it merely creates an
iterator rather than a second copy, you may get better performance.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to