Been scratching my head over this...

https://www.codecademy.com/courses/python-intermediate-en-rCQKw/2/5?curriculum_id=4f89dab3d788890003000096#

Oops, try again. median([4, 5, 5, 4]) returned 5.0 instead of 4.5

```
def median(lists):
sort = sorted(lists)
la = len(sort)
if la % 2 != 0:
n = la / 2 - 1
return lists[n]
else:
nex_mid = la / 2
prev_mid = nex_mid - 1
ave = (lists[prev_mid] + lists[nex_mid]) / 2.0
return ave
```