def print_words(text): i = 0 while i < len(text): word = "" while i < len(text) and text[i:i+1] != " ": word = word + text[i:i+1] i = i + 1 print(word) i = i + 1