Slicing versus loops, was Re: for i in range() anti-pattern

Peter Otten __peter__ at web.de
Thu Nov 30 05:56:14 EST 2006


Duncan Booth wrote:

> items[::2], items[1::2] = items[1::2], items[::2]

Cool. I really should have found that myself.

Peter




More information about the Python-list mailing list