title: Python, all combinations of element addition between two lists, with constraint
body: <p>I have two lists: </p>
  
  <pre><code>list1 = [1, 2, 3]
  list2 = [0.5, 1]
  </code></pre>
  
  <p>The task is to create all possible combinations from the original list by adding the variables from the second list to its elements:</p>
  
  <pre><code>list1 = [1+0.5, 2, 3]
  list2 = [1, 2+0.5, 3]
  list3 = [1, 2, 3+0.5]
  list4 = [1+0.5, 2+0.5, 3]
  list5 = [1, 2+0.5, 3+0.5]
  list6 = [1+0.5, 2, 3+0.5]
  list7 = [1+0.5, 2+0.5, 3+0.5]
  
  list8 = [1+1, 2, 3]
  list9 = [1,2+1,3]
  list10 = [1,2,3+1]
  list 11 = [1+1,2+1,3]
  ...
  list = [1+0.5, 2+1, 3]
  list = [1+0.5, 2, 3+1]
  ...
  </code></pre>
  
  <p>Adding complexity to the problem, I'd like to do the above but with a constraint: sum of all elements in new list should be less than 8, for example.</p>
  
  <p>Is there a nice way to do this? Possibly recursively given my initial list would have around 30 elements and my second list around 5?</p>
  
  <p>Thank you.</p>