[Tutor] Strings backwards
Hans Dushanthakumar
Hans.Dushanthakumar at navman.com
Thu Jan 19 00:23:40 CET 2006
Try this:
print word[::-1]
-----Original Message-----
From: tutor-bounces+hans.dushanthakumar=navman.com at python.org
[mailto:tutor-bounces+hans.dushanthakumar=navman.com at python.org] On
Behalf Of ryan luna
Sent: Thursday, 19 January 2006 12:13 p.m.
To: tutor at python.org
Subject: [Tutor] Strings backwards
Hello, what i need to do is get user input and then print the string
backwards ^^ i have no idea how to do that,
print "Enter a word and i well tell you how to say it backwards"
word = raw_input("Your word: ")
print word
all that is simple enough im sure printing it out backwards is to, just
dont know how ^^, thanks for any help.
_______________________________________________
Tutor maillist - Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list