Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Median by Sedfer
def checkio(data):
data.sort()
len_ = len(data)
if len_%2 == 1:
return data[(len_-1)//2]
else:
return (data[(len_-1)//2] + data[(len_+1)//2])/2.0
Oct. 29, 2015