title: Creating a recursive function that gets the sum of all possible subsets in a list of integers
body: <p>If i were to get the sum of all possible subset-combinations in the list [1,2,3] i would use the code below:</p>
  
  <pre><code>def f():
      for i in range(2):
          for j in range(2):
              for k in range(2):
                      x = i*1 + j*2 + k*3 
                      print x
  f()
  </code></pre>
  
  <p>How can i make a recursive function that does this for any list?
  I can solve this using itertools.combinations but i would like to learn the recursive way.
  Thanks</p>