add exo monday

This commit is contained in:
2024-11-30 21:20:08 +01:00
parent 8f80a875bf
commit 338db4ab8c
13 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
def is_palindrom(word)->bool:
word = list(word)
if len(word) < 2:
return True
if word[0] == word[-1]:
word.pop(0)
word.pop(-1)
return is_palindrom(word)
else:
return False
print(is_palindrom("do geese see god".replace(' ', '')))