Last active
July 23, 2016 18:53
-
-
Save felipecabargas/5250567 to your computer and use it in GitHub Desktop.
Verificador de Palíndromos
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
#!/usr/bin/python | |
#Developed by A. Felipe Cabargas <[email protected]> | |
#All rights reserved 2013 - http://github.com/felipecabargas | |
def invertir_digitos(n): | |
return int(str(n)[::-1]) | |
n = int(raw_input("Ingrese n: ")) | |
p = invertir_digitos(n) | |
if n == p: | |
print "Es palíndromo" | |
else: | |
print "No es palíndromo" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment