title: Splitting on last delimiter in Python string?
body: <p>What's the recommended Python idiom for splitting a string on the <em>last</em> occurrence of the delimiter in the string? example:</p>
  
  <pre><code># instead of regular split
  &gt;&gt; s = "a,b,c,d"
  &gt;&gt; s.split(",")
  &gt;&gt; ['a', 'b', 'c', 'd']
  
  # ..split only on last occurrence of ',' in string:
  &gt;&gt;&gt; s.mysplit(s, -1)
  &gt;&gt;&gt; ['a,b,c', 'd']
  </code></pre>
  
  <p><code>mysplit</code> takes a second argument that is the occurrence of the delimiter to be split. Like in regular list indexing, <code>-1</code> means the last from the end. How can this be done?</p>