View Single Post
Old 03-04-2005, 05:56 AM   #2 (permalink)
technobard
Centurion Nova Prime
 
technobard's Avatar
 
Join Date: May 2002
Location: Oak Park, IL (USA)
Posts: 287
technobard is on a distinguished road
A quick google search came up with this:

str = "Hello, world!"
revstr = str[::-1]
print revstr

Or (Python 2.4):

str = "Hello, world!"
print "".join(reversed(str))
__________________
It takes 2 points to draw a straight line, but at least 3 points to draw a conclusion.
technobard is offline   Reply With Quote