[Tutor] (no subject)

shellcom3 at juno.com shellcom3 at juno.com
Tue Sep 8 19:09:57 CEST 2009



I,m trying to get a phrase from a user and print it backwards using the for statement along with the range function, but all I get with range function is integers not alpha. example range(-1) does not work.






message = raw_input("enter a message: ")


# will produce a back ward message by elements 1 @ time

print message[::-1]


    
raw_input("\n\nPress the enter key to exit.\n")    



enter a message: what time is it
ti si emit tahw


Press the enter key to exit.





____________________________________________________________
Get Medical Insurance quotes and compare plans. Click now.
http://thirdpartyoffers.juno.com/TGL2141/fc/BLSrjpTInCRVJAUElsmT5bwVZjc6LtIZ7jXy33NsWVplFqavu7wZrW7Uk9a/


More information about the Tutor mailing list