 <pre><code>l = [1,2,3,4, 5, 6, 7, 8] print [[l[:i], l[i:]] for i in range(1, len(l))] </code></pre> <p>If you want all combinations. you can do like this.</p> <pre><code>print [l[i:i+n] for i in range(len(l)) for n in range(1, len(l)-i+1)] </code></pre> <p>or</p> <pre><code>itertools.combinations </code></pre>