title: Python trim space based on condition
body: <p>I have the following string.</p>
  
  <pre><code>yesterday webcast featuring $ aapl $ wynn $ goog $ lgf trader education
  </code></pre>
  
  <p>I wish to combine the "$" sign and the succeeding word and produce the output as follows:</p>
  
  <pre><code>yesterday webcast featuring $aapl $wynn $goog $lgf trader education
  </code></pre>
  
  <p>Is there any generic function instead of writing a loop to do so?</p>
  
  <p>Thanks.</p>