title: Need to combine two functions into one (Python)
body: <p>Here is my code-</p>
  
  <pre><code>def Max(lst):
      if len(lst) == 1:
          return lst[0]
      else:
          m = Max(lst[1:])
          if m &gt; lst[0]: 
              return m
          else:
              return lst[0]
  def Min(lst):
      if len(lst) == 1:
          return lst[0]
      else:
          m = Min(lst[1:])
          if m &lt; lst[0]: 
              return m
          else:
              return lst[0]
  print("Max number:",Max([5,4,100,0,2]))
  print("Min number:",Min([5,4,100,0,2]))
  </code></pre>
  
  <p>Basically I need a single function that returns both the largest and smallest number and it needs to be recursively. How would would I change this code?</p>