>>>> What about range(0, -n, -1) ? >>>> >>> That would need to have a starting value of -1 and an end value of >>> -(len(phrase)+1). Of else you can start at length - 1, end at zero >>> and a step value of -1. >> >> Another option, using "normal" range values but negative indexing is >> >> for i in range(1,len(word)+1): >> print word[-i], >>
Or (and I'll duck after I pass on what I just happened across today on the web): ### for i in range(len(word)): print word[~i] ### /c _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor