I have a problem because I've coded my function on my own text editor and it tells me that there's a problem. But in the site it tells me that my code is right.

```
OUTPUT :
[4, 4, 5, 5]
2.0
Traceback (most recent call last):
File "median.py", line 17, in <module>
print(median([4,5,5,4]))
File "median.py", line 8, in median
mede = lst[mide] + lst[mide+1]
TypeError: list indices must be integers or slices, not float
```

I personally use the last version of Python.

```
CODE :
def median(lst):
list.sort(lst)
le=len(lst)
if le%2 == 0:
mide= le/2
mede = lst[mide] + lst[mide-1]
mede /= 2.0
return(mede)
else:
mid = le/2
med = lst[mid]
return(med)
```