title: How to run a python program more than once
body: <p>How do I make my python program run more than once without having to restart it.
  Below is the code:</p>
  
  <pre><code>words = [str(x) for x in raw_input().split(' ')]
  
  string = raw_input()
  
  def word_search():
  
      for x in words:
  
          while len(string)==30:
              if x in string:
                  print x, 'appeared', string.count(x), 'time(s)'
              else:
                  print x, 'appeared', string.count(x), 'time(s)'
  
              break
  
          else:
              print 'Your longer string should not be less or more than 30.'
  word_search()
  </code></pre>