Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # #!/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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement