AndreiL
Welcome to AndreiL.
Enjoy your time.
Please log in.

Palindrome of a number - Python

Go down

Palindrome of a number - Python

Post by Lucaci Andrei on Mon Feb 20, 2012 1:27 am

1
2
3
4
5
6
7
'''
Created on Feb 20, 2012

@author: sin
'''
n = raw_input("Number: ")
print "The palindrome of", n, "is", str(n)[::-1] + '.'


This is a short and simple example of finding the palindrome of a number.
avatar
Lucaci Andrei
"Tata Lor"


Number of messages : 222
Points : 2266743
Reputation : 1007
Registration date : 2008-08-15
Age : 26
Location : Cluj-Napoca

View user profile http://www.andreil.wgz.ro

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum