title: How can I slice a list based on the lengths from another list?
body: <p>I got two lists:</p>
  
  <pre><code>list1 = [4,6,4] 
  
  list2 = [1,1,1,1,0,0,0,0,0,0,1,1,1,1]
  </code></pre>
  
  <p>Now I want to create a new list, which contains the first four items(because of list1[0] = 4) from <code>list2</code> as one listelement.</p>
  
  <pre><code>list3 = [(1,1,1,1),(0,0,0,0,0,0),(1,1,1,1)]
  </code></pre>