Programmation Python/Exercices sur les bases du langage/Palindrome
Aller à la navigation
Aller à la recherche
def is_palindorme(X):
return X==X[::-1]
mot=input("votre mot: ")
X=mot
Y= is_palindrome(X)
if Y == True:
print("palindrome")
else:
print("n'est pas \ "
"palindrome et donne: ",X[::-1])