spacepaste

  1.  
  2. def getChange(amount, curr, left):
  3. if sum(curr) == amount:
  4. return curr
  5. else:
  6. for i, x in enumerate(left):
  7. getChange(amount, curr + list(x), left[:i]+left[i:])
  8.