title: python append syntax error with a list
body: <p>My goal is to make a list called residuals that returns a list that has the absolute value of each element minus the average, I'm also returning data at the end because that is the list I am using. I got this far but am getting a syntax error with <code>residuals.append(new_number)</code>.</p>
  
  <pre><code>data = [92.5, 87.7, 74.8, 93., 91.7, 90.0, 90.3, 92.5, 100.0, 
    100.0, 35.7, 37.4, 21.0]
  
  def residuals(number):
      residuals = []
      for element in number:
          new_number = abs(element - float(avg(number))
          residuals.append(new_number)
          print residuals
  residuals(data)
  </code></pre>