title: Maximum deviation from numbers in a list
body: <p>How do i make a function to find the average  and the max deviation( the highest # between average and another number from list)?</p>
  
  <p>If the list was [1,6,8], it should print that the max deviation is 4 and the average is 5.</p>
  
  <p>I should then write another function using these two values as the arguments to output them.</p>
  
  <p>What is wrong with my code? I know i should use .sort for the max deviation but I'm not sure exactly how.</p>
  
  <p>Assume I already outputted mylist in a previous function: def list_output(mylist)</p>
  
  <pre><code>def code(avg,max_dev):
      avg = sum(mylist)/len(mylist)
      max_dev = ????????
      return avg
      return max_dev
  
  def main_output(avg,max_dev):
      print "The average is", avg, "The maximum deviation is", max_dev
  main_output(code(avg, max_dev))
  </code></pre>