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