title: take sum of ints preserving specific information
body: <p>I have a list of ints</p>
  
  <pre><code>list = [25, 50, 70, 32, 10, 20, 50, 40, 30]
  </code></pre>
  
  <p>And I would like to sum up the ints (from left to right) if their sum is smaller than 99. Lets say I write this output to a list, than this list should look like this:</p>
  
  <pre><code>           #75 because 25+50 = 70. 25+50+70 would be &gt; 99
  new_list = [75, 70, 62, 90, 30]
                 #70 because 70+32 &gt; 99
                     #62 because 32+10+20 = 62. 32+10+20+50 would be &gt; 99
  </code></pre>
  
  <p>But that is not all. I want to save the ints the sum was made from as well. So what I actually want to have is a data structure that looks like this:</p>
  
  <pre><code>list0 = [ [(25,50),75], [(70),70], [(32, 10, 20),62], [(50, 40),90], [(30),30] ]
  </code></pre>
  
  <p>How can I do this?</p>