title: Cythonize list of all splits of a string
body: <p>I'm trying to speed up a piece of code that generates all possible splits of a string.</p>
  
  <pre><code>splits('foo') -&gt; [('f', 'oo'), ('fo', 'o'), ('foo', '')]
  </code></pre>
  
  <p>The code for this in python is very simple:</p>
  
  <pre><code>def splits(text):
      return [(text[:i + 1], text[i + 1:])
              for i in range(len(text))]
  </code></pre>
  
  <p>Is there a way to speed this up via cython or some other means? For context, the greater purpose of this code is to find the split of a string with the highest probability.</p>