Simplest as:
>>> def print_reversed(s):
... for letter in reversed(s):
... print letter,
...
>>> print_reversed('banana')
a n a n a b
>>>
Other possible solution could be putting the index to be the last index of the string. Then you are going to read the string letter by letter backwards, lowering the index value by 1 each time. Then the code snipplet that you showed could become:
>>> def print_reversed2(s):
... index = len(s) - 1
... while index >= 0:
... letter = fruit[index]
... print letter
... index = index - 1
...
>>> print_reversed2('banana')
a
n
a
n
a
b
>>>
Using the interactive interpreter (just type 'python' in a command prompt) could help you experiment with such code snipplets. Like for example:
>>> fruit = 'banana'
>>> len(fruit)
6
>>> len(fruit) - 1
5
>>> while index >= 0:
... print "index at: " + str(index)
... print "fruit[index] at: " + fruit[index]
... index = index - 1
...
index at: 5
fruit[index] at: a
index at: 4
fruit[index] at: n
index at: 3
fruit[index] at: a
index at: 2
fruit[index] at: n
index at: 1
fruit[index] at: a
index at: 0
fruit[index] at: b
>>>