title: Reverse word order of a string with no str.split() allowed
body: <p>What is the pythonic way to doing this?</p>
  
  <p>From this: 'This is a string to try' to this: 'try to string a is This'</p>
  
  <p>My first guess was:</p>
  
  <pre><code>for w in 'This is a string to try'.split(' ')[::-1]:
      print w,
  </code></pre>
  
  <p>but <em>str.split()</em> is not allowed. Then I came up with this:</p>
  
  <pre><code>def reverse_w(txt):
      tmp = []
      while (txt.find(' ') &gt;= 0):
          tmp.append(txt[:txt.find(' ')])
          txt = txt[txt.find(' ')+1:]
      if (txt.find(' ') == -1):
          tmp.append(txt)
     return tmp[::-1]
  </code></pre>