Monday, March 26, 2012

exercise 8.1 - reverse_string

"""=======================
exercise 8.1
======================="""

def reverse_string (word):
    limit = len(word) * -1
    index = -1
    while index >= limit:
        letter = word[index]
        print letter
        index = index - 1

reverse_string("word")

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.