As other have pointed out descriptive variable naming will improve readability a great deal. Things like
char allude to a character, but that's vague and needlessly shortened.
In a programmatic mindset of looking for optimizations it can be easy to try to reduce the size of code, but the length of variable names are of no consequence. It's more important their name be unambiguous and understandable from a glance than it be short.
for loop can represent, among other things, operating on a set of items interacting with each on in turn. A
while loop can represent, among other things, consuming a resource one item at a time. Perhaps it is the latter that this exercise was mean to demonstrate, thus the requirement of using a
while loop instead of any loop.
word = "Wednesday"
word = word[:-1]
An empty sequence (list with no items, string with no characters) is evaluated to False for things like While loop conditions. This is equivalent to "while the string 'word' is not an empty string."
This project seems to be a fine way to explore string slicing. On the python website's "An informal introduction to Python" string slicing is introduced
and it is shown that getting index -1 of a string or other sequence returns the last item.
word = word[:-1]
[:-1] will get everything except the last item.
You can combine these to continue printing
word, trimming off what was printed, until there is nothing left to print. If the word was actually a list (and you could make it one if you really wanted with
list(word)) you could use the
list.pop function which you can find more on here. In that case this code may look more like this:
char = ["w","e","d","n","e","s","d","a","y"]
char = list("Wednesday")