A quick question

D'Arcy J.M. Cain darcy at druid.net
Wed May 28 06:39:12 EDT 2008


On Wed, 28 May 2008 10:25:01 -0000
"James" <cobrocks at msn.com> wrote:
> I just started using python and cant figure this out, I'm trying to 
> make a program where someone types in a word and the program gives it 
> back backwards.  For example if the person puts in "cat" I want the 
> program to give it back as "tac" and what it does is prints out 3,2,1.  
> How can I get these integers to print as letters?  This is what I have,
> 
> word = raw_input("Type a word:")
> start = len(word)
> 
> for letter in range(start, 0, -1):
>     print letter  

Try "for letter in start:"

-- 
D'Arcy J.M. Cain <darcy at druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



More information about the Python-list mailing list