
6.1
By:
dvdjaco on
Feb 18th, 2012 | syntax:
Python | size: 0.33 KB | hits: 28 | expires: Never
# #!/usr/bin/python
#
# By dvdjaco
# Exercise 6.1
#
# Write a while loop that starts at the last character in the string and works its way backwards to the first character in the string, printing each letter on a separate line, except backwards.
word = 'backwards'
i = len(word) - 1
while i >= 0:
print word[i]
i = i - 1