Skip to content

Instantly share code, notes, and snippets.

@felipecabargas
Last active July 23, 2016 18:53
Show Gist options
  • Save felipecabargas/5250567 to your computer and use it in GitHub Desktop.
Save felipecabargas/5250567 to your computer and use it in GitHub Desktop.
Verificador de Palíndromos
#!/usr/bin/python
#Developed by A. Felipe Cabargas <felipe@cabargas.com>
#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