title: How can I split by 1 or more occurrences of a delimiter in Python?
body: <p>I have a formatted string from a log file, which looks like:</p>
  
  <pre><code>&gt;&gt;&gt; a="test                            result"
  </code></pre>
  
  <p>That is, the test and the result are split by some spaces - it was probably created using formatted string which gave <code>test</code> some constant spacing.</p>
  
  <p>Simple splitting won't do the trick:</p>
  
  <pre><code>&gt;&gt;&gt; a.split(" ")
  ['test', '', '', '', ... '', '', '', '', '', '', '', '', '', '', '', 'result']
  </code></pre>
  
  <p><code>split(DELIMITER, COUNT)</code> cleared some unnecessary values:</p>
  
  <pre><code>&gt;&gt;&gt; a.split(" ",1)
  ['test', '                           result']
  </code></pre>
  
  <p>This helped - but of course, I really need:</p>
  
  <pre><code>['test', 'result']
  </code></pre>
  
  <p>I can use <code>split()</code> followed by <code>map</code> + <code>strip()</code>, but I wondered if there is a more Pythonic way to do it.</p>
  
  <p>Thanks,</p>
  
  <p>Adam</p>
  
  <p><strong>UPDATE:</strong> Such a simple solution! Thank you all.</p>