diff --git a/Palindrome.py b/Palindrome.py new file mode 100644 index 0000000..2619b98 --- /dev/null +++ b/Palindrome.py @@ -0,0 +1,9 @@ +def checkPalindrome(text): + return text == text[::-1] + +string = 'level' + +if checkPalindrome(string): + print(string + ' is palindrome') +else: + print(string + ' is not palindrome')