A curious bit of code...

Ethan Furman ethan at stoneleaf.us
Thu Feb 13 19:23:40 EST 2014


On 02/13/2014 01:24 PM, Roy Smith wrote:
>   Emile van Sebille wrote:
>>
>> But I didn't see this one:
>>
>> s[::len(s)-1]
>
> I love it.  I need to add this to my list of Python trivia questions.

Great interview question:  What does this do?  What is its weakness?  How would you fix it?

--
~Ethan~



More information about the Python-list mailing list