|
@@ -1,8 +1,8 @@
|
|
|
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.'
|
|
|
+ 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(x)}" is not a palindrome.'
|
|
|
-print(Solution().isPalindrome(text))
|
|
|
+ return f'The text "{str(phrase)}" is not a palindrome.'
|
|
|
+print(Solution().isPalindrome(text))
|