title: eliminate white spaces between words using regex in python
body: <p>I want to eliminate white space between 2 words among sentence containing many words</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>import re
  sentence = "open app store"
  pattern = re.compile(r'\b([a-z]) (?=[a-z]\b)', re.I)
  sentence = re.sub(pattern, r'\g&lt;1&gt;', sentence)
  print(sentence)
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>open app store
  </code></pre>
  
  <p>I want to remove white space between app and store. I want output like this "open appstore".</p>
  
  <p>Note that <code>app</code> won't always come up with <code>store</code>, <code>app</code> can come along with some other word after it, e.g. <code>app maker</code>.</p>