title: Python error : AttributeError: 'NoneType' object has no attribute 'len'
body: <p>My code is very simple but I can't figure out why it is throwing this error ?</p>
  
  <pre><code>def median(numbers):
       newnumbers = numbers.sort()
       length = newnumbers.len()
       print length
  
  median([4,6,1])
  </code></pre>
  
  <p>I searched online and also on SO and len() is correct way to get length of list. However, I keep getting error "AttributeError: 'NoneType' object has no attribute 'len'"</p>
  
  <p>What am I doing wrong here ?   Thanks !</p>