title: python all combinations of subsets of a string
body: <p>I need all combinations of subsets of a string. In addition, a subset of length 1 can only be followed by a subset with length > 1. E.g. for string <code>4824</code> the result should be:</p>
  
  <pre><code> [ [4, 824], [4, 82, 4], [48, 24], [482, 4], [4824] ]
  </code></pre>
  
  <p>So far I managed to retrieve all possible subsets with:</p>
  
  <pre><code>    length = len(number)
      ss = []
      for i in xrange(length):
          for j in xrange(i,length):
              ss.append(number[i:j + 1])
  </code></pre>
  
  <p>which gives me:</p>
  
  <pre><code>  ['4', '48', '482', '4824', '8', '82', '824', '2', '24', '4']
  </code></pre>
  
  <p>But I don't know how to combine those now. </p>