I want to print each word in word = "They stumble who run fast" on a new line using index slicing.
I've tried using a while loop, like printing words after each space
word = "They stumble who run fast"
space = word.count(' ')
start = 0
while space != -1:
print(word[start:space])
The result should be like this:
They
stumble
who
run
fast