Palindrome Golf
Posted
by Claudiu
on Stack Overflow
See other posts from Stack Overflow
or by Claudiu
Published on 2008-10-23T04:17:25Z
Indexed on
2010/06/05
20:32 UTC
Read the original article
Hit count: 455
The goal: Any language. The smallest function which will return whether a string is a palindrome. Here is mine in Python:
R=lambda s:all(a==b for a,b in zip(s,reversed(s)))
50 characters.
The accepted answer will be the current smallest one - this will change as smaller ones are found. Please specify the language your code is in.
© Stack Overflow or respective owner