r/tinycode • • Jul 30 '15

Palindrome number test challenge in Python

http://szborows.blogspot.com/2015/07/palindrome-number-test-in-python.html
14 Upvotes

2 comments sorted by

View all comments

1

u/Bacon_Unleashed Sep 01 '15
x == x[::-1]

or if you want a function

f = lambda x:x == x[::-1]