Each word needs to be on a different line in a given statement and am not able to print the last word.
# [ ] Print each word in the quote on a new line
quote = "they stumble who run fast"
start = 0
space_index = quote.find(" ")
while space_index != -1:
print(quote[start:space_index])
start = space_index+1
space_index = quote.find(" ",start)
if space_index == -1:
print(space_index[start:])
Expected output:
they
stumble
who
run
fast
I am not able to print the last word: "fast"