Created
October 28, 2020 13:45
-
-
Save soyHouston256/f5295aa5f8ed88d957872f3bbae2a843 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def es_palindromo(palabra): | |
palabra = palabra.replace(' ', '').lower() | |
if palabra == palabra[::-1]: | |
return True | |
else: | |
return False | |
def run(): | |
palabra = input('Ingrese una palabra: ') | |
if es_palindromo(palabra): | |
print('Es palindromo') | |
else: | |
print('No es palindromo') | |
if __name__ == "__main__": | |
run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment