Error: (with [1] supplied)

Oops, try again.

median([1]) resulted in an error: 'list' object has no attribute 'len'

I need help here obviously. It keeps erroring out. With median[4.5.5.4], it kept returning 4 instead of 4.5. And with median[1], I keep getting the one I mentioned above: median([1]) resulted in an error: 'list' object has no attribute 'len'

Any ideas?

```
def median(x):
new_lst = x
s = new_lst.sort() #sortiing list
leng = new_lst.len(s) #getting length
#Below: was getting an error when the list was just a [1] so made the 'if' and 'elif' to check if length is greater than 1 and then the other half of the argument.
if leng > 1 and leng % 2 != 0:
med = (leng / 2.0)
return med
elif leng > 1 and leng % 2 == 0:
a = (leng / 2.0)
b = a - 1
c = s.index[a]
d = s.index[b]
med = s[c] + s[d] / 2.0
return med
else:
return s
```

Thanks in advance for your help!!!