palindrome iteration

Terry Reedy tjreedy at udel.edu
Fri Aug 27 17:41:07 EDT 2010


On 8/27/2010 3:43 PM, Jussi Piitulainen wrote:
> Dave Angel writes:

> There could easily be a .reverse() method on strings. It would return
> the reversed string, like .swapcase() returns the swapcased string.

Could be, but the main use case seems to be for palindrome testing ;-)
Given that slicing and reversed() can do the same thing, the need is thin.

-- 
Terry Jan Reedy




More information about the Python-list mailing list