56 votes

I'm a palindrome. Are you?

Pyth, 3 bytes _I_ Returns True or False. Try it online! How it works ...
user avatar
  • 206k
47 votes

I'm a palindrome. Are you?

Python, 39 bytes lambda s:s[::-1]==s#s==]1-::[s:s adbmal Try it online! Boring, but if there is shorter in Python it will be impressive.
user avatar
43 votes

Generate Dennis Numbers

CJam, 45 bytes 0{{)_s:C,2m*{~Ce\is_W%=},,2/:O!CCW%=|}g}ri*SO Try it online! How it works ...
user avatar
  • 206k
36 votes

"Convenient palindrome" checker

GolfScript, 107 91 .4:ab-1:ba=;1 %ba%{...fi@@= c43.=;)('"([{ }])"'~?~'"([{ }])"')(;=.34c =@@if...}%ab% 1;=ab:1-ba:4. Newlines are artistic. ...
user avatar
  • 206k
35 votes

I'm a palindrome. Are you?

Jelly, 5 bytes ḂŒ ŒḂ Returns 1 or 0. The first line is an unexecuted helper link, the second line calls the palindrome test. Try it online!
user avatar
  • 206k
34 votes

Palindrome Hello, World

///, 37 bytes Greetings, Planet!/!tenalP ,sgniteerG
user avatar
  • 206k
31 votes
Accepted

Watson-Crick palindromes

05AB1E, 10 7 bytes Code: Â'š×‡Q Explanation: To check if a string is a palindrome, we just need to check the input with the input, with ...
user avatar
  • 43.3k
30 votes

Goodness Giza Golf!

Python 2, 48 47 46 bytes lambda s:s[~len(s)/2:]in'987654321'>s==s[::-1] Test it on Ideone. How it works In Python, a chained comparison returns True if and ...
user avatar
  • 206k
28 votes

Palindromic palindrome generator

Dyalog APL, 6 4 ⌽,,⌽ Try it here. Other solutions: ⌽,⊢⊢,⌽ ⌽⊢⊢,⊢⊢⌽ Explanation They are just: ...
user avatar
  • 35.8k
24 votes

I'm a palindrome. Are you?

Jelly, 5 bytes ⁼ṚaṚ⁼ Try it online! Equals reverse and reverse equals. Or the more efficient yet less aesthetically pleasing: ...
user avatar
23 votes

Palindromic palindrome generator

piet 19x2 = 38 Accepts input until it encounters 0x00. Doesn't terminate, but output will be correct.
user avatar
  • 4,613
23 votes

I'm a palindrome. Are you?

Haskell, 87 85 44 34 bytes p=(==)<*>reverse--esrever>*<)==(=p Explanation: ((->) a) is an instance of ...
user avatar
23 votes

I'm a palindrome. Are you?

Mathematica, 23 bytes QemordnilaP;PalindromeQ Not very interesting, but for the sake of completeness... The above is a ...
user avatar
22 votes

Goodness Giza Golf!

Perl, 39 37 42 39 + 1 = 40 bytes Using a new method, I managed to cut down a huge number of bytes. Run with the -n flag. Accepts input repeatedly at runtime, ...
user avatar
22 votes

I'm a palindrome. Are you?

05AB1E, 3 bytes Code: ÂQÂ Explanation: ...
user avatar
  • 43.3k
20 votes

User Appreciation Challenge #1: Dennis ♦

Jelly, 11 bytes ŒufØAe€ØCŒḂ Try it online! Alternate versions: ŒlfØae€ØCŒḂ ...
user avatar
19 votes

Palindromic palindrome generator

APL, 9 ⍞←Z,⌽,Z←⍞ Explanation: ...
user avatar
  • 31.1k
19 votes

I'm a palindrome. Are you?

PHP, 55 bytes <?=strrev($s=$argv[1])==$s;#;s$==)]s[TEG_$=s$(verrts=?< Try it online!
user avatar
19 votes
Accepted

Yo boy, must it sum

Brachylog, 7 bytes ~+ℕᵐ.↔ᵐ Try it online! Surprisingly not that slow. Explanation ...
user avatar
  • 35.2k
18 votes

Heterograms, Palindromes, oh my!

Pyth, 17 bytes Z.{rzZ.q.Zzr}.Z Try it online here. The leading space is necessary. I have counted it and the trailing space in the byte count. Here's the ...
user avatar
18 votes

Watson-Crick palindromes

Jelly, 9 bytes O%8µ+U5ḍP Try it online! or verify all test cases. How it works ...
user avatar
  • 206k
18 votes

User Appreciation Challenge #1: Dennis ♦

05AB1E, 9 bytes žM¹álSåÂQ Try it online! -2 thanks to Adnan. This attacks Jelly's pain point exactly. It uses l and ...
user avatar
17 votes

Convert a program to a palindromic program

Perl, 55 54 bytes undef$/;$a=<>."\n__END__\n";print$a,scalar reverse$a; Reads program source from stdin and writes to stdout. Result of running on itself: ...
user avatar
  • 2,719
17 votes

Heterograms, Palindromes, oh my!

Python 3, 125 The main problem is to make the reverse of the code parsable. Then we can let it error out from undefined identifiers. ...
user avatar
  • 30.8k
17 votes

Palindromize this string!

Python 3, 41 bytes lambda t:t+t[-2::-1]#]1-::2-[t+t:t adbmal Try it here.
user avatar
  • 99.3k
17 votes

I'm a palindrome. Are you?

MATL, 7 bytes tPX=XPt Try it online! Returns [1; 1] for palindromic input and [0; 0] otherwise. ...
user avatar
  • 763
17 votes

Palindromic Primes without 11

Python 2, 76 73 72 70 69 68 bytes n=input();c=k=m=11 while n:m*=k/c;k+=c;n-=`k`==`k`[::~m%k-c] print k Thanks to @WheatWizard for golfing off 3 bytes! Thanks to ...
user avatar
  • 206k
17 votes

User Appreciation Challenge #1: Dennis ♦

x86 32-bit machine-code function, 42 41 bytes Currently the shortest non-golfing-language answer, 1B shorter than @streetster's q/kdb+. With 0 for truthy and non-zero for falsy: 41 40 bytes. (in ...
user avatar
  • 4,129
17 votes

Palindromic numbers with a binary twist

05AB1E, 7 bytes b0Ü‚DíQ Try it online! or as a Test Suite Explanation ...
user avatar
  • 51.7k

Only top scored, non community-wiki answers of a minimum length are eligible