title: Last element in python list, created by splitting a string is empty
body: <p>So I have a string which I need to parse. The string contains a number of words, separated by a hyphen (<code>-</code>). The string also ends with a hyphen.</p>
  
  <p>For example <code>one-two-three-</code>.</p>
  
  <p>Now, if I want to look at the words on their own, I split up the string to a list.</p>
  
  <pre><code>wordstring = "one-two-three-"
  wordlist = wordstring.split('-')
  
  for i in range(0, len(wordlist)):
       print(wordlist[i])
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>one
  two
  three
  #empty element
  </code></pre>
  
  <p>What I don't understand is, why in the resulting list, the final element is an empty string.
  How can I omit this empty element?</p>
  
  <p>Should I simply truncate the list or is there a better way to split the string?</p>