[docs] string reverse

Chris Kogelnik kogelnik at gmail.com
Wed Apr 4 21:23:28 CEST 2012

Hi Sandro,

I realize it's mentioned in the how-to docs.  I just felt it was such a 
fundamental operation that is easily overlooked, that having it 
mentioned in both the library and in the online docs, which are 
referenced more, would be beneficial.  I've missed it on occasion.



On 3/31/12 1:31 PM, Sandro Tosi wrote:
> Hello Chris,
> On Wed, Mar 21, 2012 at 19:25, Chris Kogelnik<kogelnik at gmail.com>  wrote:
>> Hi,
>> There is no string reverse method in Python, but there is an easy way to do
>> it using negative stepping in the extended slice syntax, ie.
>> some_string[::-1].  Since this is somewhat non-intuitive, I think adding a
>> note to the String Methods section under Built-in Types will spare a lot of
>> people the time of implementing such a method.
> It is already mentioned at:
> http://docs.python.org/faq/programming.html#how-do-i-iterate-over-a-sequence-in-reverse-order
> Regards,

More information about the docs mailing list