title: How to print one word at a time on one line?
body: <p>I want to write code which allows me to print a word out and then it disappears and the next word prints. For example, if I have "Hello World!," the program should print "Hello" then the word disappears and then "World!" prints and then disappears. I should be able to change the speed of the printing words as well. Currently I was able to figure out how to print characters at a certain speed, but how do I print words one by one?</p>
  
  <pre><code>import time
  import sys
  
  def print_char(s):
      for c in s:
          sys.stdout.write( '%s' % c )
          sys.stdout.flush()
          time.sleep(0.1)
  
  print_char("hello world")
  </code></pre>