A curious bit of code...
Roy Smith
roy at panix.com
Thu Feb 13 16:24:35 EST 2014
In article <mailman.6880.1392324956.18130.python-list at python.org>,
Emile van Sebille <emile at fenx.com> wrote:
> On 2/13/2014 11:59 AM, Zachary Ware wrote:
> > In a fit of curiosity, I did some timings:
>
> Snip of lots of TMTOWTDT/TIMTOWTDI/whatever... timed examples :)
>
> But I didn't see this one:
>
> s[::len(s)-1]
>
> Emile
I love it. I need to add this to my list of Python trivia questions.
More information about the Python-list
mailing list