Discuss / Python / return str(n) == str(n)[::-1]

return str(n) == str(n)[::-1]

Topic source

siusuu

#1 Created at ... [Delete] [Delete and Lock User]

-- coding: utf-8 --

def is_palindrome(n): return str(n) == str(n)[::-1]


  • 1

Reply