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