```
def median(lst):
lst = sorted(lst)
length = len(lst)
summa = 0
if length % 2 != 0:
return lst[(length/2)-1:(length/2)]
elif length == 1:
return lst[0]
else:
for i in lst[(length/2)-1:(length/2)+1]:
summa += i
return float(summa)/2
```

Oops, try again. median([1]) returned [] instead of 1