Answers for "recursive palindrome python"

0

check palindrome in python using recursion

def isPalindrome(string):
  	#termination condition: the string is one character or less
    if (len(string) <= 1):
        return True
    if (string[0] == string[-1]):
        return isPalindrome(string[1:-1])
    else:
        return False
Posted by: Guest on July-09-2021
0

palindrom python rekursiv

def ispalindrome(word):
    return word == word[::-1]
Posted by: Guest on January-31-2021
0

palindrom python rekursiv

def ispalindrome(word):
    if len(word) < 2: return True
    if word[0] != word[-1]: return False
    return ispalindrome(word[1:-1])
Posted by: Guest on January-31-2021

Code answers related to "recursive palindrome python"

Python Answers by Framework

Browse Popular Code Answers by Language