title: Returning one item from a tuple using recursion
body: <pre><code>def minmaxsum(lst):
      if len(lst) == 1:
          return lst[0], lst[0], lst[0]+lst[0]
      else:
          min_val, max_val, total = minmaxsum(lst[1:])
          if lst[0] &lt; min_val:
              min_val = lst[0]
          if lst[0] &gt; max_val:
              max_val = lst[0]
          total = min_val+max_val
          return min_val, max_val, total
  </code></pre>
  
  <p>Above I have my function that returns the minimum value, maximum value and sum of the minimum and maximum of a list.</p>
  
  <p>I was wondering how I would go about altering the function to return solely the total, and not the mininum or maximum.</p>
  
  <p>For example, for <code>a = [1,2,3,4,5,6]</code>,  <code>sum(a)</code> would return 7.</p>