diff --git a/python/Palindrome_with_recursiveFunc.py b/python/Palindrome_with_recursiveFunc.py new file mode 100644 index 0000000..12839a6 --- /dev/null +++ b/python/Palindrome_with_recursiveFunc.py @@ -0,0 +1,28 @@ +def mystreryRecursive(str, s, e): + if (s == e): + print("1") + return True + + + + if (s < e + 1): + print("3") + if (str[s] == str[e]): + print("2") + return True + else : + return False + + return mystreryRecursive(str, s+1, e-1) + + return False + +def mystrery(str): + n = len(str) + if (n == 0): + return True + + return mystreryRecursive(str, 0, n-1) + +word = str(input()) +print(mystrery(word))