You can also add in a break at the end of your code, see below:
fruit = 'apple' index = -1 while index <= len(fruit): letter = fruit[index] print(letter) index = index - 1 if index == len(fruit)*-1: break