title: Remove double space/tab combinations using Re in Python
body: <p>I want to replace all instances where there are consecutive tabs and/or spaces in Python with a single space, using the Re module. I do not want to remove new lines (which rules out the \s commend). At the moment I have:</p>
  
  <pre><code>    formateed_string = re.sub("\t+" , " ", formateed_string)            
      formateed_string = re.sub(" +" , " ", formateed_string)         
      formateed_string = re.sub("\t " , " ", formateed_string)    
      formateed_string = re.sub(" \t" , " ", formateed_string)
  </code></pre>
  
  <p>i.e this first checks for consecutive spaces, then consecutive tabs, then tab/space, then space/tab. this seems to normally work, however occasionally leaves behind a double-space (which I guess means there are unusual contamination of tabs/spaces which the above does not fully remove). </p>
  
  <p>Is there a simple/more elegant way of achieving this?</p>
  
  <p>[n.b. running Python 2.7]</p>