Lucas Prado Melo wrote:
On Tue, Sep 8, 2009 at 2:09 PM, [email protected] <mailto:[email protected]> <[email protected] <mailto:[email protected]>> wrote:

    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.

What about range(0, -n, -1) ?

------------------------------------------------------------------------

_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
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.

--
Kind Regards,
Christian Witts


_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to