Hello,

I made this to work, but somehow I think it's not the easiest way and I believe it might be bugged at some point.

Practise makes it perfect. 15. Median

```
def median(x):
sort = sorted(x)
iteminsorteda = 0
iteminsortedb = 0
iteminsortedc = 0
medianinsorteda = 0
medianinsortedb = 0
medianinsortedc = 0
realmedian = 0
if len(sort) % 2 == 0:
iteminsorteda = len(sort) / 2
iteminsortedb = len(sort) / 2 - 1
medianinsorteda = sort[iteminsorteda]
medianinsortedb = sort[iteminsortedb]
realmedian = (medianinsorteda + medianinsortedb) / (2.0)
return realmedian
elif len(sort) % 2 > 0:
iteminsortedc = len(sort) / 2
medianinsortedc = sort[iteminsortedc]
return medianinsortedc
```