.sort() giving me a NonType error for my function : <p>I'm trying to make a function that gives me the average of a list, excluding the maximum and minimum value. I want to sort my list but when I do, I get a 'NonType' error. Here's my code:</p>

<pre><code>def ave_no_max_min(DataList):
    return sum(DataList.sort()[1:-1])/(len(DataList)-2)
print(ave_no_max_min([2,4,3,5,11])) ##should return 
</code></pre>
