PalindromeQ

PalindromeQ[list]

returns True if the given list is identical to Reverse[list], and False otherwise.

PalindromeQ[n]

returns True if the integer n is identical to IntegerReverse[n], and False otherwise.

PalindromeQ[string]

returns True if the given string is identical to StringReverse[string], and False otherwise.

Details and Options

Examples

open allclose all

Basic Examples  (3)

A palindromic string:

In[1]:=
Click for copyable input
Out[1]=

Check the palindromic property with its list of characters:

In[2]:=
Click for copyable input
Out[2]=

A palindromic integer:

In[1]:=
Click for copyable input
Out[1]=

This is not palindromic:

In[2]:=
Click for copyable input
Out[2]=

Search for palindromic primes:

In[1]:=
Click for copyable input
Out[1]=

Scope  (3)

Generalizations & Extensions  (1)

Options  (3)

Applications  (2)

Properties & Relations  (3)

See Also

Reverse  IntegerReverse  StringReverse

Introduced in 2015
(10.3)
| Updated in 2016
(10.4)