[Tutor] Correct use of range function..

Alan Gauld alan.gauld at btinternet.com
Sun Jun 10 19:14:08 CEST 2007

"Kent Johnson" <kent37 at tds.net> wrote

> You can do better without using range; you can directly iterate the
> letters in reverse:
> for c in word[::-1]:
>   print c,

Or even just

print word[::-1]


Alan G. 

More information about the Tutor mailing list