“Palindrom Python Rekonst” Code-Antworten

Palindrom Python Rekonst

def ispalindrome(word):
    return word == word[::-1]
Dull Dogfish

Palindrom Python Rekonst

def ispalindrome(word):
    if len(word) < 2: return True
    if word[0] != word[-1]: return False
    return ispalindrome(word[1:-1])
Dull Dogfish

Ähnliche Antworten wie “Palindrom Python Rekonst”

Fragen ähnlich wie “Palindrom Python Rekonst”

Weitere verwandte Antworten zu “Palindrom Python Rekonst” auf Python

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen