- text = input('Enter any text or number: ')
- class Solution(object):
- def isPalindrome(self,x):
- if str(x)[::-1] == str(x):
- return f'The text "{str(x)}"is a palindrome.'
- else:
- return f'The text "{str(x)}" is not a palindrome.'
- print(Solution().isPalindrome(text))
|