title: How to combine similar characters in a list?
body: <p>I'm trying to combine similar characters that are next to each other that are in a list. I was wondering if there was a Python way to do it? Here's an example:</p>
  
  <pre><code>test = 'hello###_world###test#test123##'
  splitter = re.split("(#)", test)
  splitter = filter(None, splitter)
  </code></pre>
  
  <p>Which returns this in the splitter variable:</p>
  
  <pre><code>['hello', '#', '#', '#', '_world', '#', '#', '#', 'test', '#', 'test123', '#', '#']
  </code></pre>
  
  <p>I'm trying to combine the hashes so the list turns into this:</p>
  
  <pre><code>['hello', '###', '_world', '###', 'test', '#', 'test123', '##']
  </code></pre>
  
  <p>Thanks for any help!</p>